mirror of https://github.com/jetkvm/kvm.git
cleanup combobox focus
This commit is contained in:
parent
95eb908fcf
commit
6b6b86287e
|
@ -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}
|
||||||
>
|
>
|
||||||
{() => (
|
{() => (
|
||||||
|
|
Loading…
Reference in New Issue