Closed ghost closed 2 years ago
Please provide a Code Sandbox reproducer so we can debug.
I'm unable to reproduce it in the code sandbox... any heads up on how I can debug this on my side..
Error message: Uncaught TypeError: Cannot read properties of null (reading 'length') at MultiSelect.isAllSelected (multiselect.esm.js:1480)
OK two things.
Since you can't reproduce with Code Sandbox please close this ticket.
What I normally do is start stripping one thing out at a time until I narrow down the problem with my code on what is causing the issue.
Closing because I'm unable to reproduce the issue in sandbox.
Reopening this issue. Able to reproduce the issue in sandbox : https://codesandbox.io/s/primereact-test-forked-0rbtt?file=/src/index.js
Choosing the first option will show the error and choosing the second option will show how it should look like but with multiselect instead of dropdown.
Similar issue was seen in PrimeNG, I believe : https://github.com/primefaces/primeng/issues/7941
Thanks for the reproducer. Let me take a look!
I'm submitting a ... (check one with "x")
Current behavior I have a MultiSelect component being generated depending on a switch case. The options values are being generated programmatically in useEffect. However, the Multiselect is breaking for the generated options. It works fine if I provide a hardcoded value. The same generated values are working when given to a Dropdown component.
Error message: TypeError: Cannot read properties of null (reading 'length') at MultiSelect.isAllSelected
Expected behavior Expecting Multiselect to not break for programmatically generated options set.
Help...
React version: 17.0.2
PrimeReact version: 6.5.1