Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
eb38d382
Commit
eb38d382
authored
Jul 23, 2024
by
Aryan Kothari
Browse files
fix: pseudoSelectedIndex is reset when modal is closed.
parent
5beaa5d8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/lib/components/chat/ModelSelector/Selector.svelte
src/lib/components/chat/ModelSelector/Selector.svelte
+1
-1
No files found.
src/lib/components/chat/ModelSelector/Selector.svelte
View file @
eb38d382
...
@@ -45,7 +45,6 @@
...
@@ -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 @@
...
@@ -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}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment