fixed combobox and formatting
This commit is contained in:
parent
93df6b0a8b
commit
4d0baef491
7 changed files with 16 additions and 35 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue