select model on enter
Browse files
src/lib/components/InferencePlayground/InferencePlaygroundModelSelectorModal.svelte
CHANGED
@@ -24,8 +24,10 @@
|
|
24 |
event.preventDefault();
|
25 |
dispatch("close");
|
26 |
} else if (key === "Enter") {
|
27 |
-
const
|
28 |
-
|
|
|
|
|
29 |
} else if (key === "ArrowUp") {
|
30 |
event.preventDefault();
|
31 |
highlightIdx--;
|
|
|
24 |
event.preventDefault();
|
25 |
dispatch("close");
|
26 |
} else if (key === "Enter") {
|
27 |
+
const highlightedEl = document.querySelector(".highlighted");
|
28 |
+
if (highlightedEl) {
|
29 |
+
(highlightedEl as HTMLButtonElement).click();
|
30 |
+
}
|
31 |
} else if (key === "ArrowUp") {
|
32 |
event.preventDefault();
|
33 |
highlightIdx--;
|