fix(ui): e2e checks match the current dashboard; trim stray label whitespace, keep Home/End in suggest input

This commit is contained in:
sam committed 2026-10-26 20:59:48 +11:00
1 parent 3ff6867e84
commit 5498c97e3d
11 files changed
+51 -48

No files matched your search

@@ -14,6 +14,14 @@ const shown = computed(() => {
return props.options.filter((o) => o.toLowerCase().includes(needle)).slice(0, 50);
});
// The listbox claims Home and End for its items; in a text field they move the caret.
function caret(event: KeyboardEvent, end: boolean) {
const input = event.target as HTMLInputElement;
const at = end ? input.value.length : 0;
input.setSelectionRange(at, at);
input.scrollLeft = end ? input.scrollWidth : 0;
}
function type(value: string) {
typed.value = true;
model.value = value;
@@ -24,7 +32,7 @@ function type(value: string) {
<ComboboxRoot v-model="model" ignore-filter open-on-focus :display-value="(v: string) => v" @update:open="typed = false">
<ComboboxAnchor as-child>
<ComboboxInput as-child :model-value="model" @update:model-value="type">
<input v-bind="$attrs" data-slot="input" autocomplete="off" :class="cn(inputClass, props.class)" />
<input v-bind="$attrs" data-slot="input" autocomplete="off" @keydown.home="caret($event, false)" @keydown.end="caret($event, true)" :class="cn(inputClass, props.class)" />
</ComboboxInput>
</ComboboxAnchor>
<ComboboxPortal>