fix: some errors

This commit is contained in:
James Xylight committed 2024-12-23 13:49:20 -08:00
1 parent adc5dc3ad3
commit 04b29c1407
7 files changed
+22 -12

No files matched your search

@@ -22,7 +22,7 @@
let { open = $bindable(false), groups = $bindable([]) }: Props = $props()
let search = $state('')
let container: HTMLElement = $state()
let container: HTMLElement | undefined = $state()
const dispatch = createEventDispatcher()
let selectedIndex = $state(0)
let filteredGroups: Group[] = $state([])
@@ -202,6 +202,7 @@
if (!browser) return
const listItems = container?.querySelectorAll('li')
if (!listItems) return
listItems[index % listItems.length].focus()
listItems[index % listItems.length].scrollIntoView({
behavior: 'smooth',