fixed combobox and formatting

This commit is contained in:
Lucas Oliveira 2023-11-16 10:47:58 -03:00
commit 4d0baef491
7 changed files with 16 additions and 35 deletions

View file

@ -18,11 +18,15 @@ export function Combobox({
onChange,
}: {
items: { value: string; label: string }[];
onChange: (value: string) => void;
onChange: (value: string[]) => void;
}) {
const [open, setOpen] = React.useState(false);
const [value, setValue] = React.useState<string[]>([]);
React.useEffect(() => {
onChange(value);
}, [value]);
return (
<Popover open={open} onOpenChange={setOpen}>
<PopoverTrigger asChild>