q-tree - Display dynamically added nodes
I’ve tried solving the following issue but without any result.
I have a normal q-tree with some kind of data. With a button that is not in the q-tree, I want to add a new node. It works fine till the moment the new data should appear in the displayed q-tree.
In mounted-method, the data for the tree is loaded from a json-file. The data is displayed without any problems in the tree. Then, I push the button and the new data is successfully pushed to the data-object (I can see it because the data-object is also displayed). But the tree is not updated. In the data-object the new data is found.
How could it be possible to make the dynamically added data visible in the tree and not only in the data-object of the tree?
metalsadman last edited by metalsadman
@ckoeste1 check if the
node-keys you set are unique.
@metalsadman Thanks for your reply.
I’ve checked the code and all keys were unique. But another problem was with my source code. I’ve corrected it and a new leaf is added, now, but, and that is a little strange, only when I deselect the node.