MultiSelect: Pre-selected disabled options are deselected by filterting and clicking toggleAll (deselect) #15229
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
Describe the bug
Given a multiSelect component with 2 pre-selected disabled options as in https://stackblitz.com/edit/qbuqgb?file=src%2Fapp%2Fdemo%2Fmulti-select-filter-demo.ts.
When a user checks toggleAll checkbox, all options are selected. -> expected
When the user unchecks toggleAll checkbox, non-disabled options are deselected, the 2 pre-selected disabled options are still selected. -> expected
If the user enters a keyword (which does not match some of the pre-selected disabled options) to filter,
and checks toggleAll checkbox
then clear the search keyword, the 2 pre-selected disabled options are now deselected. -> unexpected
The bug seems to be introduced in PrimeNG v17.
It did not happen in old PrimeNG v15.4.1.
Environment
https://stackblitz.com/edit/qbuqgb?file=package.json
"primeng": "17.12.0",
"@angular/cdk": "^17.3.1",
Reproducer
https://stackblitz.com/edit/qbuqgb?file=src%2Fapp%2Fdemo%2Fmulti-select-filter-demo.ts
Angular version
17.3.1
PrimeNG version
17.12.0
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
18.18.0
Browser(s)
Firefox. Edge
Steps to reproduce the behavior
No response
Expected behavior
Pre-selected disabled options are selected when filtering and checking toggleAll checkbox.
The text was updated successfully, but these errors were encountered: