mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 03:26:36 +00:00
fix(header-search): "Escape" should clear search query
This commit is contained in:
parent
6b80f10a4c
commit
c42d207b09
1 changed files with 6 additions and 0 deletions
|
@ -114,6 +114,12 @@
|
|||
selectedResultIndex -= 1;
|
||||
}
|
||||
break;
|
||||
case 'Escape':
|
||||
// Reset the search query but keep the search bar active.
|
||||
// Do not dispatch "clear" event as that should fire only on the "x" button.
|
||||
value = '';
|
||||
selectedResultIndex = 0;
|
||||
break;
|
||||
}
|
||||
}}"
|
||||
on:paste
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue