We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ac9fef3 commit 100ecc3Copy full SHA for 100ecc3
packages/kit-headless/src/components/select/select.tsx
@@ -71,21 +71,22 @@ export const SelectRoot = component$(
71
const listBox = track(() => contextService.listBoxRef.value);
72
const expanded = track(() => isExpanded.value);
73
74
- if (expanded && trigger && listBox) {
+ if (!trigger || !listBox) return;
75
+
76
+ if (expanded === true) {
77
listBox.style.visibility = 'hidden';
78
79
await updatePosition(trigger, listBox);
80
81
listBox.style.visibility = 'visible';
82
83
+ listBox?.focus();
84
}
85
86
87
if (expanded === false) {
88
trigger?.focus();
89
-
- if (expanded === true) {
- listBox?.focus();
- }
90
});
91
92
useOnWindow(
0 commit comments