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

Tree/TreeSelect Selection Propagation not working correctly with filter applied #16469

Open
randes73 opened this issue Oct 1, 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

@randes73
Copy link

randes73 commented Oct 1, 2024

Describe the bug

Selection propagation in the treeview (and treeselect) only occur with filtered nodes and affects child selections based on parent selections and parent selection state (full or partially selected) based on child selections.

Environment

Angular, NodeJS & VS Code for development, C# .NET Core backendend

Reproducer

No response

Angular version

18.2.2

PrimeNG version

17.18.9

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20.16

Browser(s)

Chrome,Edge (both latest version)

Steps to reproduce the behavior

Associated Stackblitz: https://stackblitz.com/edit/gnvdu7-7zrhrz?file=package.json

Both scenarios below are using a treeview or treeSelect component, filtering enabled, and selection propagation enabled.

Using the referenced stackblitz above where the node structure follows:

  • Documents
    • Work
      • Expenses.doc
      • Resume.doc
    • Home
      • Invoices.doc

Scenario 1 - Parent does not select all children

  1. Make sure all nodes are not selected
  2. Apply a filter so that a Parent node is shown and at least one child filtered but not all ("Exp")
  3. Select Parent node (Work)
  4. Remove filter
  5. Observe child selections where only filtered nodes (Expenses.doc) were affected. Parent nodes is fully selected but not all children are selected (Resume.doc).

Scenario 2 - Parent not reflecting child node selections

  1. Make sure all nodes are not selected
  2. Apply a filter so that a Parent node is shown and at least one child filtered but not all
  3. Select child node (Expenses.doc). Observe the Parent node being fully selected.
  4. Remove filter
  5. Observe parent node still showing fully selected but not all child nodes selected (Resume.doc)

Other information: The following issue looks to be very similar to what I have reported: #15776

Expected behavior

Our experience prior to 16.9.6 with selection propagation was that the selections (or deselections) would occur regardless of filter and the parent properly reflects child selections regardless of filter.

@randes73 randes73 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Oct 1, 2024
@randes73 randes73 changed the title Component: Title Tree/TreeSelect Selection Propagation not working correctly with filter applied Oct 1, 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