mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 03:26:36 +00:00
fix(multi-select): open/focus field for filterable multiselect #635
This commit is contained in:
parent
2fa069a678
commit
fefd43dd8c
2 changed files with 8 additions and 1 deletions
|
@ -61,6 +61,7 @@
|
|||
on:mouseenter
|
||||
on:mouseleave
|
||||
on:keydown|preventDefault|stopPropagation
|
||||
on:focus
|
||||
on:blur
|
||||
>
|
||||
<slot />
|
||||
|
|
|
@ -319,6 +319,12 @@
|
|||
}
|
||||
}
|
||||
}}"
|
||||
on:focus="{() => {
|
||||
if (filterable) {
|
||||
open = true;
|
||||
if (inputRef) inputRef.focus();
|
||||
}
|
||||
}}"
|
||||
on:blur="{({ relatedTarget }) => {
|
||||
if (
|
||||
relatedTarget &&
|
||||
|
@ -342,7 +348,7 @@
|
|||
...item,
|
||||
checked: false,
|
||||
}));
|
||||
fieldRef.blur();
|
||||
if (fieldRef) fieldRef.blur();
|
||||
}}"
|
||||
translateWithId="{translateWithId}"
|
||||
disabled="{disabled}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue