|
Title: tree onCheck fires for every checked node after load Post by: jokersoft on December 22, 2013, 01:47:15 PM I have a dynamically loading tree.
In this tree config I have onCheck that fires some script. Problem is onCheck fires for every node with attr "checked" after load. 1) Question is can the nodes be somehow loaded checked or unchecked without triggering onCheck? 2) Also, what can I send via JSON so the node become "indeterminate"? Or the only way is to use filter? Title: Re: tree onCheck fires for every checked node after load Post by: stworthy on December 22, 2013, 05:39:45 PM To prevent from triggering onCheck event when loading data, change onCheck event to an empty function and then restore it after load successfully.
Code: var t = $('#tt'); // the tree objectIf you are loading data from 'url', the better way is to customize the loader function. Code: $('#tt').tree({Title: Re: tree onCheck fires for every checked node after load Post by: jokersoft on December 23, 2013, 02:43:03 AM Tricky! Works, thanx! :)
I also tried a more "flat" solution: Code: var editing = false; but it didn't work for some reason... |