jquery.treeselect.js icon indicating copy to clipboard operation
jquery.treeselect.js copied to clipboard

Auto sorting and not loading as JSON passed

Open bhushangahire opened this issue 10 years ago • 2 comments

I am doing my own custom sorting for collection object which is created JSON to be passed for load callback. But treeselect is doing its own custom sorting keeping non children object on top. How I can prevent this? I dont want any sorting or ordering to be changed?

Please suggest if I am missing anything?

bhushangahire avatar Dec 02 '14 17:12 bhushangahire

I do not believe that there is any intentional sorting facility in place, but it could be a result in how the code was written to build the children nodes. Take a look at this code and see if anything sticks out as being the source for your problem. It may be beneficial to step through this _build_children_ function.

https://github.com/travist/jquery.treeselect.js/blob/master/src/jquery.treeselect.js#L713

travist avatar Dec 02 '14 20:12 travist

I did tried debugging this function. Its passing the nodes as they passed in JSON. But somehow at the end its loading the list depending on the no of children present.

bhushangahire avatar Dec 02 '14 20:12 bhushangahire