refac: search modal input filters behaviour

This commit is contained in:
Timothy Jaeryang Baek 2025-09-25 13:25:58 -05:00
parent 776d4773a9
commit 5b1f9e3e21

View file

@ -213,11 +213,14 @@
on:input={() => { on:input={() => {
dispatch('input'); dispatch('input');
}} }}
on:focus={() => { on:click={() => {
if (!focused) {
onFocus(); onFocus();
hovering = false; hovering = false;
focused = true; focused = true;
initTags(); initTags();
}
}} }}
on:blur={() => { on:blur={() => {
if (!hovering) { if (!hovering) {
@ -260,6 +263,14 @@
} }
} else { } else {
// if the user types something, reset to the top selection. // if the user types something, reset to the top selection.
if (!focused) {
onFocus();
hovering = false;
focused = true;
initTags();
}
selectedIdx = 0; selectedIdx = 0;
} }