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.
2 parents e8f027f + 55e6225 commit e695f3cCopy full SHA for e695f3c
1 file changed
apps/webapp/app/components/primitives/Select.tsx
@@ -694,6 +694,15 @@ export function ComboBox({
694
shortcut,
695
...props
696
}: ComboBoxProps) {
697
+ const combobox = Ariakit.useComboboxContext();
698
+ const open = combobox?.useState("open");
699
+ const input = combobox?.useState("baseElement");
700
+
701
+ React.useEffect(() => {
702
+ if (!open || !input) return;
703
+ input.focus();
704
+ }, [open, input]);
705
706
return (
707
<div className="flex h-9 w-full flex-none items-center border-b border-grid-dimmed bg-transparent pl-0 pr-3 text-xs text-text-dimmed outline-hidden">
708
<Ariakit.Combobox
0 commit comments