mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
fix: reactivity warnings in searchbox
This commit is contained in:
parent
5ac5aa57a8
commit
8943242b7f
1 changed files with 11 additions and 0 deletions
|
|
@ -33,9 +33,13 @@
|
|||
let isFocus = $state(false);
|
||||
let close: (() => Promise<void>) | undefined;
|
||||
|
||||
let navigating = false;
|
||||
const listboxId = generateId();
|
||||
|
||||
onDestroy(() => {
|
||||
if (navigating) {
|
||||
return;
|
||||
}
|
||||
searchStore.isSearchEnabled = false;
|
||||
});
|
||||
|
||||
|
|
@ -44,6 +48,7 @@
|
|||
|
||||
closeDropdown();
|
||||
searchStore.isSearchEnabled = false;
|
||||
navigating = true;
|
||||
await goto(`${AppRoute.SEARCH}?${params}`);
|
||||
};
|
||||
|
||||
|
|
@ -73,6 +78,9 @@
|
|||
};
|
||||
|
||||
const onFocusOut = () => {
|
||||
if (navigating) {
|
||||
return;
|
||||
}
|
||||
searchStore.isSearchEnabled = false;
|
||||
};
|
||||
|
||||
|
|
@ -161,6 +169,9 @@
|
|||
};
|
||||
|
||||
const closeDropdown = () => {
|
||||
if (navigating) {
|
||||
return;
|
||||
}
|
||||
showSuggestions = false;
|
||||
isFocus = false;
|
||||
searchHistoryBox?.clearSelection();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue