Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MultiSelect: Pre-selected disabled options are deselected by filterting and clicking toggleAll (deselect) #15229

Closed
thaihacong opened this issue Apr 8, 2024 · 1 comment · Fixed by #15230
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@thaihacong
Copy link

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.
image

When a user checks toggleAll checkbox, all options are selected. -> expected
image

When the user unchecks toggleAll checkbox, non-disabled options are deselected, the 2 pre-selected disabled options are still selected. -> expected
image

If the user enters a keyword (which does not match some of the pre-selected disabled options) to filter,
image
and checks toggleAll checkbox
image
then clear the search keyword, the 2 pre-selected disabled options are now deselected. -> unexpected
image

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.

@thaihacong thaihacong added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Apr 8, 2024
@thaihacong
Copy link
Author

Related to #14617

thaihacong pushed a commit to thaihacong/primeng that referenced this issue Apr 8, 2024
@cetincakiroglu cetincakiroglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Apr 9, 2024
@cetincakiroglu cetincakiroglu added this to the 17.13.0 milestone Apr 9, 2024
cetincakiroglu added a commit that referenced this issue Apr 9, 2024
Fixed #15229: keep pre-selected disabled options selected when filtering and checking toggleAll
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
2 participants