Closed jinzhe closed 8 months ago
... First import <PopoverClose />
component .. this has to be imported at ui/popover
import * as PopoverPrimitive from '@radix-ui/react-popover';
const PopoverClose = PopoverPrimitive.Close;
then add the component inside the CommandItem
...
<CommandItem
value={data}
key={data}
onSelect={() => {
setValue(name, data);
}}
>
<PopoverClose>{data}</PopoverClose>
</CommandItem>
This issue has been automatically closed because it received no activity for a while. If you think it was closed by accident, please leave a comment. Thank you.
I saw in the documentation that a single combobox is handled in the following way
https://ui.shadcn.com/docs/components/combobox
this is my project code