primefaces / primeng

The Most Complete Angular UI Component Library
https://primeng.org
Other
10.17k stars 4.54k forks source link

Component: p-treeselect. Selecting filtered checkbox incorrectly selecting higher nodes #15776

Open AndY322 opened 3 months ago

AndY322 commented 3 months ago

Describe the bug

when using p-treeselect component in checkbox selection mode with filter and filtering child nodes, selecting all filtered nodes - as a result higher nodes selecting as fully selected, but actually they have to be partial selected image image

Environment

N/A

Reproducer

No response

Angular version

17.0.7

PrimeNG version

17.12.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20.11.1

Browser(s)

No response

Steps to reproduce the behavior

  1. Set up p-treeselect with filter and checkbox mode
  2. filter some node with several items to have only one item
  3. select this item Result - parent node checked as 'fully' selected

Expected behavior

parent nodes should be marked as 'partial' selected

AndY322 commented 3 months ago

found one more issue, I guess it is connected with original one, if filtering, and there is a node in another group, after selecting parent nodes is not selected at all after clearing filter, but should be 'partial' selected image image please let me know if require separate issue for that