fix(multi-select): open/focus field for filterable multiselect #635

This commit is contained in:
Eric Y Liu 2021-06-27 05:37:47 -07:00
commit fefd43dd8c
2 changed files with 8 additions and 1 deletions

View file

@ -61,6 +61,7 @@
on:mouseenter
on:mouseleave
on:keydown|preventDefault|stopPropagation
on:focus
on:blur
>
<slot />

View file

@ -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}"