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 Component: deselecting a checkbox item after selectall is not properly binded and previous selected items get reset on using filters. #15516

Open
joshi-renu opened this issue May 10, 2024 · 0 comments
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@joshi-renu
Copy link

Describe the bug

This is in reference to the issue https://github.com/primefaces/primeng/issues/15294.
The selectAll functionality in Virtual Scroll with filter is working fine but deselection has not taken into account while resolving that issue. After filtering, selecting selectAll and then deselecting any item doesn't deselect the selectAll checkbox.
There is a concept of header checkbox template introduced for partial and all selections, but there is no proper information provided in the documentation, even both of their functions look the same. Please resolve this bug and update the documentation with proper examples.

Another bug, if we previously select any item and then search with some keywordand then selectAll, previously selected item gets removed from the selected list.

Environment

Angular CLI: 17.3.3
Angular: 17.3.2
Node: 20.9.0
zone.js: 0.14.4
Typescript: 5.2.2
Package Manager: npm 10.1.0
OS: win32 x64

Reproducer

No response

Angular version

17.3.2

PrimeNG version

17.11.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20.9.0

Browser(s)

No response

Steps to reproduce the behavior

Bug1 :

  1. Implement VirtualScroll in the Multiselect component and add the onSelectAllChange() logic as provided in the PrimeNG demo example. This can also be reproduced directly on the demo example given on the PrimeNG website.
  2. Navigate to the Multiselect dropdown.
  3. Click on the search filter and enter a keyword.
  4. Click on the Select All header checkbox.
  5. Now, deselect any of the selected item, selectAll should also be deselcted but it doesn't happen so.

Bug2:

  1. Implement VirtualScroll in the Multiselect component and add the onSelectAllChange() logic as provided in the PrimeNG demo example. This can also be reproduced directly on the demo example given on the PrimeNG website.
  2. Navigate to the Multiselect dropdown.
  3. Select any item from the dropdown.
  4. Now go to search filter and search for any item other than the previous selected item.
  5. Now click on Select All, you will see the previously selected doesn't appear in the selected list.

Expected behavior

Bug 1:
Expected behavior is to select and deselect, both of which should be properly bound with the selectAll checkbox
Bug 2:
Expected behavior is that previously selected items without any filters should not get reset/removed, if we search for some items with filters and click on selectAll.

@joshi-renu joshi-renu added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

1 participant