Kendo-angular: Flat data binding doesn't work as expected for nested tree view nodes

Created on 25 May 2018  路  5Comments  路  Source: telerik/kendo-angular

I'm submitting a...

  • Bug report

Current behavior

When we bind TreeView to flat data using _kendoTreeViewFlatDataBinding_ it works well for root level nodes, but changes to the nested nodes do not appear on UI until we collapse/expand their parent nodes (assume that _kendoTreeViewExpandable_ directive is used). If _kendoTreeViewExpandable_ is removed the situation becomes even worse because in that case there is no way to see new items at all.

Expected behavior

When nodes are changed all expanded tree nodes should be refreshed on UI.

Minimal reproduction of the problem with instructions

Here is a plank with an example: link

Bug treeview

Most helpful comment

Any update on this? Your collapse-expand workaround animates the treeview, which is a bit annoying...

I attempted to expand and collapse the group in two successive setTimeout calls, but even then the tree view is animated.

All 5 comments

any update on this? We're experiencing the same issue. TreeView does not refresh child nodes, when a new array with "new child items" is bound to the nodes property.

Indeed, the component won't update the list, because the group doesn't trigger its change detection accordingly. We will further investigate the case and will try to find a feasible solution.

For the time being, you can collapse-expand the group to force its re-render:
https://plnkr.co/edit/svC1IkLR470xEu9lPL91?p=preview

Any update on this? Your collapse-expand workaround animates the treeview, which is a bit annoying...

I attempted to expand and collapse the group in two successive setTimeout calls, but even then the tree view is animated.

The issue in question has been fixed in the latest develop version of the kendo-angular-treeview package.

Fixed in 2.3.0

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pkoecker picture pkoecker  路  16Comments

djarekg picture djarekg  路  18Comments

EricSch picture EricSch  路  17Comments

JaapMosselman picture JaapMosselman  路  28Comments

simon11196 picture simon11196  路  17Comments