mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-26 07:11:00 -05:00
refac
This commit is contained in:
1 parent
6f2e97aa58
commit
fc9c2ea191
13 files changed
+81
-51
No files matched your search
@@ -34,12 +34,12 @@
|
||||
|
||||
$: items = [...noteItems, ...knowledgeItems, ...fileItems];
|
||||
|
||||
$: if (query !== undefined) {
|
||||
const handleSearchInput = () => {
|
||||
clearTimeout(searchDebounceTimer);
|
||||
searchDebounceTimer = setTimeout(() => {
|
||||
getItems();
|
||||
}, 300);
|
||||
}
|
||||
};
|
||||
|
||||
onDestroy(() => {
|
||||
clearTimeout(searchDebounceTimer);
|
||||
@@ -111,6 +111,7 @@
|
||||
if (e.detail === false) {
|
||||
onClose();
|
||||
query = '';
|
||||
handleSearchInput();
|
||||
}
|
||||
}}
|
||||
>
|
||||
@@ -128,6 +129,7 @@
|
||||
<input
|
||||
class=" w-full text-sm pr-4 py-1 rounded-r-xl outline-hidden bg-transparent"
|
||||
bind:value={query}
|
||||
on:input={handleSearchInput}
|
||||
placeholder={$i18n.t('Search')}
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user