External store for Tree

Comments

  • edited June 3

    probably there is a bug.
    as a workaround add this after sync command

    $$('tree').loadBranch = webix.bind(store.loadBranch, store);
    

    https://snippet.webix.com/iyfrwxlc

  • edited June 3

    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 :
    1) do not use dynamic loading (rendering of Tree is very fast, so possibly you don't need dynamic loading):
    https://snippet.webix.com/lpk0bk77
    2) catch the node expansion events (onBeforeOpen or onAfterOpen) to load branch data (using the loadBranch method):
    https://snippet.webix.com/57eg2ggu
    3) or use the example above which @intregal attached

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!