webix-hub / webix-jet

Webix Jet micro framework for Webix UI
67 stars 19 forks source link

JetApp.refresh() and multilevel sidebar #29

Closed kino90 closed 5 years ago

kino90 commented 5 years ago

I have a multi-level sidebar loaded with

webix
  .ajax()
  .get("/my/menu/endpoint")
  .then(res => {
    const menu = res.json().map(convertMenuData);
    sidebarConfig.parse(menu, "json");
  });

where

sidebarConfig is a webix.DataCollection().

When this.app.refresh() is executed in another part of the app (to change language, for example) the whole app refresh and the sidebar is loaded with only the first level items.

If i try to inspect sidebarConfig (the DataCollection) I can also only see the first level items of the menu.

Any ideas?

kino90 commented 5 years ago

Solved by using TreeCollection instead, as DataCollection is only for non-hierarchical data.