Massload with Open_all in JSTree and Lazy Loading

645 views
Skip to first unread message

Nirav Kamani

unread,
Sep 22, 2015, 6:16:43 AM9/22/15
to jsTree

I am using JSTree in my application.

I have very huge data to be displayed in JSTree.

I have around 200 000 nodes to be displayed.

I provided search functionality to user. Upon search I am clearing previous instance of jstree and creating new instance with required data.

On Loaded event which is fired when "Root" node is loaded I am calling open_all() method to open all nodes,

I have huge data and I am using lazy loading. So for example in one case I have 20K nodes inside one node. So it makes 20K ajax request which ultimately leads to "ERR_INSUFFICIENT_RESOURCES".

How can I integrate massload functionality over here with open_all()?

Ivan Bozhanov

unread,
Sep 22, 2015, 3:50:07 PM9/22/15
to jsTree
Yes, it is built in - just add the "massload" plugin to your config "plugins" array and configure it according to the docs.

As for the recreating of the tree - keep in mind there is no need to do that - jstree can handle searches with AJAX, and if you have massload configured - it will load everything necessary in a single request. Of course I do not know all the details - just check the search.ajax option and see if it will work for you..

Best regards,
Ivan
Reply all
Reply to author
Forward
0 new messages