MultiSelect broken for empty array
If you have a PrimeNG PRO Support subscription please post your issue at;
https://pro.primefaces.org
where our team will respond within 4 business hours.
If you do not have a PrimeNG PRO Support subscription, fill-in the report below. Please note that your issue will be added to the waiting list of community issues and will be reviewed on a first-come first-serve basis, as a result, the support team is unable to guarantee a specific schedule on when it will be reviewed. Thank you for your understanding.
Current Queue Time for Review Without PRO Support: ~8-12 weeks. With PRO Support: 1 hour
I'm submitting a ... (check one with "x")
[x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35
Plunkr Case (Bug Reports) Please demonstrate your case at stackblitz by using the issue template below. Issues without a test case have much less possibility to be reviewed in detail and assisted.
https://stackblitz.com/edit/github-zhgb7m
(don't forget to update "primeng" to 8.0.1 before trying)
Current behavior When I try to open "multiselect" dropdown with no items it crashes and console output shows:
ERROR TypeError: Cannot read property 'length' of undefined at MultiSelect.isAllChecked (multiselect.ts:461)
Expected behavior I expect it to work properly (not crash).
Minimal reproduction of the problem with instructions Try and open "multiselect" in the provided stackblitz example above. It will crash. Although, it seems that with version 8.0.0 it is working fine, so the issue seems to have been introduced with the version 8.0.1.
What is the motivation / use case for changing the behavior? I'd like to use "multiselect" in my app ;)
Please tell us about your environment: Windows 10 x64 v1809
-
Angular version: 8.1.1
-
PrimeNG version: 8.0.1
-
Browser: Chrome 75.0.3770.100 ; didn't try others
-
Language: TypeScript 3.4.5
-
Node (for AoT issues):
node --version= 12.6.0
+1
We are also experiencing this issue. Primeng 8.0.0 works, but with 8.0.1 it does not!
+1 with Primeng 8.0.1
It seems that this will be resolved as a part of 8.0.2 release. Reference issue: #7950 Therefore, I am closing this issue...
in the meantime, turning off the toggle all feature, makes the problem go away... of course, this is applicable only if you can live without that feature till 8.0.2 patch comes out :)
<p-multiSelect
[showToggleAll]="false"
...>