feat: migrate ListBox with virtual collection and accessible parts
This commit is contained in:
+9
-1
@@ -10,6 +10,7 @@ withDefaults(
|
||||
multiple?: boolean;
|
||||
disabled?: boolean;
|
||||
name?: string;
|
||||
cancelNavigation?: boolean;
|
||||
}>(),
|
||||
{ modelValue: undefined, defaultValue: undefined },
|
||||
);
|
||||
@@ -26,7 +27,14 @@ const emit = defineEmits<{ "update:modelValue": [value: unknown] }>();
|
||||
:name="name"
|
||||
@update:model-value="emit('update:modelValue', $event)"
|
||||
>
|
||||
<ListboxContent aria-label="Audit choices">
|
||||
<ListboxContent
|
||||
aria-label="Audit choices"
|
||||
@keydown="
|
||||
(event: KeyboardEvent) => {
|
||||
if (cancelNavigation) event.preventDefault();
|
||||
}
|
||||
"
|
||||
>
|
||||
<ListboxItem :value="0">Numeric zero</ListboxItem>
|
||||
<ListboxItem value="0">String zero</ListboxItem>
|
||||
<ListboxItem value="disabled" disabled>Disabled</ListboxItem>
|
||||
|
||||
Reference in New Issue
Block a user