refac
This commit is contained in:
@@ -63,12 +63,12 @@
|
||||
|
||||
let showImportModal = false;
|
||||
|
||||
$: if (query !== undefined) {
|
||||
const handleSearchInput = () => {
|
||||
clearTimeout(searchDebounceTimer);
|
||||
searchDebounceTimer = setTimeout(() => {
|
||||
setFilteredItems();
|
||||
}, 300);
|
||||
}
|
||||
};
|
||||
|
||||
$: if (tools && viewOption !== undefined) {
|
||||
setFilteredItems();
|
||||
@@ -325,6 +325,7 @@
|
||||
<input
|
||||
class=" w-full text-sm pr-4 py-1 rounded-r-xl outline-hidden bg-transparent"
|
||||
bind:value={query}
|
||||
on:input={handleSearchInput}
|
||||
aria-label={$i18n.t('Search Tools')}
|
||||
placeholder={$i18n.t('Search Tools')}
|
||||
/>
|
||||
@@ -335,6 +336,7 @@
|
||||
aria-label={$i18n.t('Clear search')}
|
||||
on:click={() => {
|
||||
query = '';
|
||||
handleSearchInput();
|
||||
}}
|
||||
>
|
||||
<XMark className="size-3" strokeWidth="2" />
|
||||
|
||||
Reference in New Issue
Block a user