mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
fix(toolbar-search): clearing value should re-focus search bar (#1263)
Fixes #1258
This commit is contained in:
parent
099fcbcda8
commit
49a852b1f3
1 changed files with 2 additions and 0 deletions
|
@ -68,6 +68,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
async function expandSearch() {
|
async function expandSearch() {
|
||||||
|
await tick();
|
||||||
if (disabled || persistent || expanded) return;
|
if (disabled || persistent || expanded) return;
|
||||||
expanded = true;
|
expanded = true;
|
||||||
await tick();
|
await tick();
|
||||||
|
@ -94,6 +95,7 @@
|
||||||
bind:ref
|
bind:ref
|
||||||
bind:value
|
bind:value
|
||||||
on:clear
|
on:clear
|
||||||
|
on:clear="{expandSearch}"
|
||||||
on:change
|
on:change
|
||||||
on:input
|
on:input
|
||||||
on:focus
|
on:focus
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue