Describe the bug
When using the MultiSelect component in "controlled mode" (passing values and onValuesChange props), specifically within a ShadCN form component, selecting an item triggers an infinite render loop and crashes the application with Maximum update depth exceeded.
Affected component/components
MultiSelect
How to reproduce
-
Wrap MultiSelect in a Shadcn Form
-
Pass values and onValuesChange to the component
-
Click on any MultiSelectItem
-
The application crashes immediately
Codesandbox/StackBlitz link
No response
Logs
System Info
Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.
Before submitting
Describe the bug
When using the MultiSelect component in "controlled mode" (passing values and onValuesChange props), specifically within a ShadCN form component, selecting an item triggers an infinite render loop and crashes the application with Maximum update depth exceeded.
Affected component/components
MultiSelect
How to reproduce
Codesandbox/StackBlitz link
No response
Logs
System Info
Before submitting