Posted 29 April 2024, 5:45 am EST
I have a React app and am trying to use the Wijmo MultiSelect component. The list of items that are checked is stored externally from my component (in Redux).
I am trying to encapsulate the Wijmo component in my own custom component and then expose certain props. One of the props is the list of items and another is the “onChange” even for when the user changes which item(s) are checked.
When I attempt to do this, the Wijmo component infinitely calls the onChange event resulting in a max-depth recursion error from React.
How can I accomplish this without Wijmo crashing React?
Here is a live example of my issue:
https://stackblitz.com/edit/react-7pxxyv?file=index.js,ComboBox.js,index.html