I upgraded primereact from version 6.6.0 to version 8.0.0 and now setting the maxSelectedLabels of a MultiSelect to 0 appears to be equivalent to setting it to null, which causes all selected options to be displayed. Before the upgrade it caused the number of selected options to always be displayed, regardless of the selection. I believe this to be a bug and whish that the old behaviour, distinguishing between 0 and null, would be restored.
Describe the bug
I upgraded primereact from version 6.6.0 to version 8.0.0 and now setting the maxSelectedLabels of a MultiSelect to 0 appears to be equivalent to setting it to null, which causes all selected options to be displayed. Before the upgrade it caused the number of selected options to always be displayed, regardless of the selection. I believe this to be a bug and whish that the old behaviour, distinguishing between 0 and null, would be restored.
Reproducer
https://codesandbox.io/s/primereact-test-forked-77x2o7
PrimeReact version
8.1.1
React version
17.x
Language
TypeScript
Build / Runtime
Create React App (CRA)
Browser(s)
No response
Steps to reproduce the behavior
maxSelectedLabels={0}
Expected behavior
When maxSelectedLabels is set to 0, the number of selected options should always be displayed, including in the case in which no option is selected.