mirror of
https://github.com/open-webui/open-webui
synced 2024-11-24 21:13:59 +00:00
fix: pseudoSelectedIndex is reset when modal is closed.
This commit is contained in:
parent
5beaa5d892
commit
eb38d382ba
@ -45,7 +45,6 @@
|
|||||||
let ollamaVersion = null;
|
let ollamaVersion = null;
|
||||||
|
|
||||||
let pseudoSelectedIndex = 0;
|
let pseudoSelectedIndex = 0;
|
||||||
let autoScrollTimeout;
|
|
||||||
|
|
||||||
$: filteredItems = items.filter(
|
$: filteredItems = items.filter(
|
||||||
(item) =>
|
(item) =>
|
||||||
@ -206,6 +205,7 @@
|
|||||||
bind:open={show}
|
bind:open={show}
|
||||||
onOpenChange={async () => {
|
onOpenChange={async () => {
|
||||||
searchValue = '';
|
searchValue = '';
|
||||||
|
pseudoSelectedIndex = 0; // when the dropdown is closed, reset the selected index
|
||||||
window.setTimeout(() => document.getElementById('model-search-input')?.focus(), 0);
|
window.setTimeout(() => document.getElementById('model-search-input')?.focus(), 0);
|
||||||
}}
|
}}
|
||||||
closeFocus={false}
|
closeFocus={false}
|
||||||
|
Loading…
Reference in New Issue
Block a user