kendo-angular icon indicating copy to clipboard operation
kendo-angular copied to clipboard

Wrong parent state when children are collapsed and `CheckDirective` is used

Open Raisolution opened this issue 5 years ago • 5 comments

Could be reproduced in the following example

Steps to reproduce:

  1. Use Mode Multiple
  2. Expand the Furniture node
  3. Check the Furniture node
  4. Collapse the Furniture node
  5. Unchecked the Furniture node - instead of clearing the checkbox, it's now ended up in intermediate state
  6. Expand the Furniture node - all child are checked, but Furniture node is still in intermediate state
  7. Check the Furniture node will change to correct behavior

Expected behavior: Parent state is correctly changed to unchecked after step 5.

Reported in ticket 1418042

Related to #2265 #2132

Raisolution avatar Jul 15 '19 08:07 Raisolution

I am dealing with the same bug. It should also uncheck all childs if the parent is collapsed and you uncheck it. Not sure how to fix it.

tomasmejia avatar Jul 23 '19 18:07 tomasmejia

It's almost the end of the year. Any update on this? Thanks.

cdtapay avatar Dec 03 '20 16:12 cdtapay

It's almost end of 2021 and issue still have not been resolved. Please expedite this.

midexsoftware avatar Dec 17 '21 15:12 midexsoftware

Recently mentioned in - 1566016, 1570900 and 1546612

yanmariomenev avatar Jun 08 '22 11:06 yanmariomenev

Currently, the workaround is to set the loadOnDemand property to false (by default it is true):

https://www.telerik.com/kendo-angular-ui/components/treeview/checkboxes/#toc-preloaded-nodes

Here is an example:

https://stackblitz.com/edit/angular-mkji7f

For the cases when the children need to be loaded on demand, there isn't an available solution yet.

mbechev avatar Sep 16 '22 09:09 mbechev

When using [loadOnDemand]="true" the TreeView doesn't know of its collapsed nodes. This is why, unchecking a parent will not uncheck its collapsed children.

To achieve the required behavior, we added a new property uncheckCollapsedChildren. Set [uncheckCollapsedChildren]="true" to achieve the requirement.

The new property is available since @progress/kendo-angular-treeview v15.1.0.

svetq avatar Mar 07 '24 15:03 svetq