This commit is contained in:
Timothy Jaeryang Baek
2026-06-17 00:17:14 +02:00
parent 6f2e97aa58
commit fc9c2ea191
13 changed files with 81 additions and 51 deletions
+4 -2
View File
@@ -180,14 +180,14 @@
await getItemsPage();
};
$: if (query !== undefined) {
const handleSearchInput = () => {
clearTimeout(searchDebounceTimer);
searchDebounceTimer = setTimeout(() => {
if (loaded) {
init();
}
}, 300);
}
};
$: if (loaded && sortKey !== undefined && permission !== undefined && viewOption !== undefined) {
init();
@@ -380,6 +380,7 @@
<input
class=" w-full text-sm py-1 rounded-r-xl outline-hidden bg-transparent"
bind:value={query}
on:input={handleSearchInput}
placeholder={$i18n.t('Search Notes')}
/>
@@ -389,6 +390,7 @@
class="p-0.5 rounded-full hover:bg-gray-100 dark:hover:bg-gray-900 transition"
on:click={() => {
query = '';
handleSearchInput();
}}
>
<XMark className="size-3" strokeWidth="2" />