Closed nicky508 closed 5 years ago
Hi! Could you please show the code you using in https://jsfiddle.net. The format you provided works for me (https://jsfiddle.net/amsik/x0dfze43/)
If you want to add nodes to the tree (dynamicly or after some time) you have to use API
I think I found the issue. To construct the structure I use function provided by another library. If I create a test outside the funtion: var treeData = []; var test = {}; test.text = "test"; treeData.push(test); It works. If I create the same test within the function it does not work, Although I am able to get print the data to the console after returning. The issue is not in the handling of the liquor tree or something.
I found the liqour Tree lib and looks like something I would like to user. I dynamically built a json structure but the tree does not want to load the structure. The following structure is printed in the console:
The only thing shown in on the page is a checkbox with no text and no child features. I have totally no clue why it does not work. The only thing which I found is if I let the generate method return "{text: "test"}", it does work. But when the complete structure is generated like:
var treeData = []; var test = {}; test.text = "test"; treeData.push(test);
it does not work. Compared with the standard working json tree, it is totally the same structure.