Skip to content

Commit

Permalink
fix: add tag on tab when isOpen = false
Browse files Browse the repository at this point in the history
closes #1159
  • Loading branch information
varnastadeus committed May 18, 2019
1 parent 941217f commit ab8b661
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions demo/app/examples/tags.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ import { Component, ChangeDetectionStrategy } from '@angular/core';
<ng-select [items]="[]"
[addTag]="true"
[multiple]="true"
[selectOnTab]="true"
[isOpen]="false">
</ng-select>
---
Expand Down
2 changes: 1 addition & 1 deletion src/ng-select/ng-select.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ export class NgSelectComponent implements OnDestroy, OnChanges, AfterViewInit, C
}

private _handleTab($event: KeyboardEvent) {
if (!this.isOpen) {
if (this.isOpen === false && this._manualOpen === false) {
return;
}
if (this.selectOnTab) {
Expand Down

0 comments on commit ab8b661

Please sign in to comment.