deitch/jstree-model-back — Issue #2: Nodes created twice and more...
Author: Sitolog
Created: 2012-02-13 10:46:44+00:00
State: open

Hi Deitch,

Thanks to you guidelines, I made good progress building dynamically the tree object with Ajax. I use the ajax getJSON() function ( called within openNode: function(cb) as per your advise ) to get one object per open node, from a PHP/SQL routine. Not completed yet, but looks promising...

However I face a bug, not only with my code, but also with the two provided examples (even with with the static model example) : When opening, then closing and re-opening a node, its childrens are listed twice. Everytime a node is closed and re-opened, it continously add once more all its childrens (create duplicates).

So I assume that when closing a node, it should delete its childnodes. But this is not working from what I can see.
Tried to debug myself, with no success so far.

Any idea ?

Cheers
Franck