fix: action selector auto-focus

fixes #108
This commit is contained in:
2024-04-23 16:57:53 +02:00
parent 77d4a90519
commit a40daefbad

View File

@@ -5,7 +5,7 @@
KEYMAP_IDS,
} from "$lib/serial/keymap-codes";
import FlexSearch from "flexsearch";
import { createEventDispatcher } from "svelte";
import { createEventDispatcher, onMount } from "svelte";
import ActionListItem from "$lib/components/ActionListItem.svelte";
import LL from "../../../i18n/i18n-svelte";
import { action } from "$lib/title";
@@ -13,6 +13,10 @@
export let currentAction: number | undefined = undefined;
export let nextAction: number | undefined = undefined;
onMount(() => {
searchBox.focus();
});
const index = new FlexSearch.Index({ tokenize: "full" });
createIndex();