cleanup combobox focus

This commit is contained in:
Andrew Davis 2025-04-05 23:57:20 +10:00
parent 95eb908fcf
commit 6b6b86287e
No known key found for this signature in database
GPG Key ID: 30AB5B89A109D044
1 changed files with 1 additions and 8 deletions

View File

@ -47,16 +47,9 @@ export function Combobox({
const inputRef = useRef<HTMLInputElement>(null); const inputRef = useRef<HTMLInputElement>(null);
const classes = comboboxVariants({ size }); const classes = comboboxVariants({ size });
const handleChange = (value: unknown) => {
if (onChange) {
onChange(value);
inputRef.current?.blur();
}
};
return ( return (
<HeadlessCombobox <HeadlessCombobox
onChange={handleChange} onChange={onChange}
{...otherProps} {...otherProps}
> >
{() => ( {() => (