Tree Exapnd issue.

Hi,

  1. I have a tree panel in which I want child nodes on demand.
  2. I have fetched root nodes first and set webix_kids property to true.
  3. When I expand first node then there is a call to the server with node’s id, which is perfect.
  4. The issue is when I expand the node second time there are two calls to the server.
  5. Consider this case study:
  • I have 4 root nodes say P1, P2, P3, P4.
  • I have expanded P1, then P1’s id is sent back to the server.
  • Then, I have expanded P2, then first call to the server is with P1’s id and then second call will be with P2’s id.
  • Now when I am expanding P4, then again there are two calls to the server, first with P1’s id and second with P4’s id.
  1. Need help in this issue.

Hi, could you please provide a snippet where the issue can be spotted?

As far as I can see, the functionality works smoothly: http://webix.com/snippet/d234e4bc

Hi Helga,

The snippet that you provided is of onDataRequest() function call. This function works fine, no doubt about that.

The issue is when there is no call back, and webix_kids property is true, then after expanding the tree, call to the server is made, but then there are two calls per request.

My app is working fine with onDataRequest() call. I am just letting you know about the bug.

My fault, sorry. But with normal url loading the issue cannot be spotted either: http://webix.com/snippet/e06e61f1

The Tree removes the webix_kids property automatically after branch data is loaded, and hence, additional requests are not issued. Please, correct me if I am not right.

I have checked your snippet, you have used webservice to return json response I think.

I am using ajax to get json data. I think ajax is causing the problem.