Skip to content

Commit

Permalink
[ACA-1968] auto focus input
Browse files Browse the repository at this point in the history
  • Loading branch information
suzanadirla committed Nov 20, 2018
1 parent aabfdb3 commit 853f658
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<div class="app-search-container" [matMenuTriggerFor]="searchOptionsMenu">
<div class="app-search-container" [matMenuTriggerFor]="searchOptionsMenu"
(menuOpened)="onMenuOpened()">
<button mat-icon-button
class="app-search-button"
[title]="'SEARCH.BUTTON.TOOLTIP' | translate">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ export class SearchInputComponent implements OnInit, OnDestroy {
this.onDestroy$.complete();
}

onMenuOpened() {
this.searchInputControl.searchInput.nativeElement.focus();
}

/**
* Called when the user submits the search, e.g. hits enter or clicks submit
*
Expand Down

0 comments on commit 853f658

Please sign in to comment.