Skip to content

Commit

Permalink
(fix) in multi select mode after enter the search is not focused (bit…
Browse files Browse the repository at this point in the history
  • Loading branch information
bulldog98 committed Sep 26, 2020
1 parent 1faaacd commit 19f5d50
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/app/mat-select-search/mat-select-search.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,11 @@ export class MatSelectSearchComponent implements OnInit, OnDestroy, ControlValue
event.stopPropagation();
}

if (event.key && event.key === 'Enter') {
// Regain focus after multiselect, so we can further type
setTimeout(() => this._focus(), 200);
}

// Special case if click Escape, if input is empty, close the dropdown, if not, empty out the search field
if (this.enableClearOnEscapePressed === true && event.keyCode === ESCAPE && this.value) {
this._reset(true);
Expand Down

0 comments on commit 19f5d50

Please sign in to comment.