kendo-angular
kendo-angular copied to clipboard
Wrong parent state when children are collapsed and `CheckDirective` is used
Could be reproduced in the following example
Steps to reproduce:
- Use Mode Multiple
- Expand the Furniture node
- Check the Furniture node
- Collapse the Furniture node
- Unchecked the Furniture node - instead of clearing the checkbox, it's now ended up in intermediate state
- Expand the Furniture node - all child are checked, but Furniture node is still in intermediate state
- 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
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.
It's almost the end of the year. Any update on this? Thanks.
It's almost end of 2021 and issue still have not been resolved. Please expedite this.
Recently mentioned in - 1566016, 1570900 and 1546612
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.
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.