Multiselect: selectionLimit not working if the value 0 is provided #15400
Labels
Resolution: Stale
Issue or pull request is inactivity and unfortunately it will be *closed* if there is no response
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Describe the bug
if the [selectionLimit] property is set to zero, it's treated the same as null or undefined (because javascript). Instead I am having to work around that by disabling all options if the selectionLimit is zero.
This error is caused by the following code snipet
null or undefined check should be done on this.selectionLimit
Environment
Angular 17, reactive forms
Reproducer
No response
Angular version
17
PrimeNG version
17.11
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
18
Browser(s)
chrome. edge
Steps to reproduce the behavior
HTML:
TS:
when the value of maxSelectedConnectors is changed to 0, the feature doesn't work anymore as discribed previously
Expected behavior
the selectionLimit should be set to 0, which means all options should be disabled
The text was updated successfully, but these errors were encountered: