Skip to content
Snippets Groups Projects
Commit 77d2e9dd authored by Etienne LOUPIAS's avatar Etienne LOUPIAS
Browse files

fix(search): call search when input is cleared (chrome)

parent e1740b1b
No related branches found
No related tags found
2 merge requests!907V3.2.0,!900Resolve "[Annuaire ] - Bug"
......@@ -7,6 +7,7 @@
[(ngModel)]="value"
(ngModelChange)="onChange()"
(keyup.enter)="handleSearch()"
(input)="clear($event)"
/>
<app-icon-button
ariaLabel="Rechercher"
......
......@@ -19,6 +19,13 @@ export class SearchBarComponent {
this.searchSubmitted.emit(this.value);
}
public clear(event: Event): void {
// Call search if cross icon in the input is clicked (only in chrome for input of type search)
if (!(event instanceof InputEvent) && event.type === 'input') {
this.handleSearch();
}
}
public onChange(): void {
this.valueChange.emit(this.value);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment