Skip to content

Commit e695f3c

Browse files
authored
Merge branch 'main' into samejr/thinking-orbs-storybook
2 parents e8f027f + 55e6225 commit e695f3c

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

apps/webapp/app/components/primitives/Select.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,15 @@ export function ComboBox({
694694
shortcut,
695695
...props
696696
}: 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+
697706
return (
698707
<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">
699708
<Ariakit.Combobox

0 commit comments

Comments
 (0)