Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions apps/webapp/app/components/primitives/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,15 @@ export function ComboBox({
shortcut,
...props
}: ComboBoxProps) {
const combobox = Ariakit.useComboboxContext();
const open = combobox?.useState("open");
const input = combobox?.useState("baseElement");

React.useEffect(() => {
if (!open || !input) return;
input.focus();
}, [open, input]);
Comment thread
samejr marked this conversation as resolved.
Comment thread
samejr marked this conversation as resolved.

return (
<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">
<Ariakit.Combobox
Expand Down