Commit eb38d382 authored by Aryan Kothari's avatar Aryan Kothari
Browse files

fix: pseudoSelectedIndex is reset when modal is closed.

parent 5beaa5d8
......@@ -45,7 +45,6 @@
let ollamaVersion = null;
let pseudoSelectedIndex = 0;
let autoScrollTimeout;
$: filteredItems = items.filter(
(item) =>
......@@ -206,6 +205,7 @@
bind:open={show}
onOpenChange={async () => {
searchValue = '';
pseudoSelectedIndex = 0; // when the dropdown is closed, reset the selected index
window.setTimeout(() => document.getElementById('model-search-input')?.focus(), 0);
}}
closeFocus={false}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment