The tree does not work with external TreeCollection.
According to the documentation, it should work. https://docs.webix.com/desktop__nonui_objects.html#datacollectionandtreecollectionusage
probably there is a bug.
as a workaround add this after sync command
$$('tree').loadBranch = webix.bind(store.loadBranch, store);
Hello @lBeJIuk,
The problem is that the Tree takes loaded data from “store” TreeCollection and does not send own requests. The sync
method synchronizes the data that received initially by url
in the TreeCollection. If you want that Tree sends requests, you need to set up data loading for it.
There are two possibilities :
- do not use dynamic loading (rendering of Tree is very fast, so possibly you don’t need dynamic loading):
Code Snippet - catch the node expansion events (
onBeforeOpen
oronAfterOpen
) to load branch data (using theloadBranch
method):
Code Snippet - or use the example above which @intregal attached