mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
fix(header-search): "Escape" should clear search query (#1851)
This commit is contained in:
parent
d68dc18266
commit
6da4572c26
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