Skip to content

Commit

Permalink
fix(search-bar): trigger search on click
Browse files Browse the repository at this point in the history
  • Loading branch information
alecarn committed Apr 29, 2024
1 parent c08cdd1 commit 114f911
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@
<mat-divider *ngIf="withDivider" [vertical]="true"></mat-divider>

<div class="search-bar-buttons">
<button *ngIf="showSearchButton" mat-icon-button [color]="color">
<button
*ngIf="showSearchButton"
mat-icon-button
[color]="color"
(click)="handleSearch()"
>
<mat-icon>search</mat-icon>
</button>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,10 @@ export class SearchBarComponent implements OnInit, OnDestroy {
}
}

handleSearch(): void {
this.doSearch(this.term);
}

/**
* Clear the stream and the input
*/
Expand Down

0 comments on commit 114f911

Please sign in to comment.