I am trying to implement Fancy Tree which displays data in tree structure as well as stores the updated child data. I need it in the request, to update in database.
My Fancy tree has 3 levels. 3rd level has child with additional JSON Key-Value pairs. It looks like below :
Color Height Comments
Category-1
Plants1
Lily White 5 test-lily
Hibiscus Yellow 8 test
Animals1
Rabbit White 20 test-some-comments
Squirrel Brown 3 some-other-comments
...
Category-2
Plants2
Jasmine White 5 test-jasmine
Hibiscus Yellow 8 test
Animals2
Cat White 15 test-some-comments
Dog Brown 12 some-other-comments
...
...
Color, Height , Comments are editable text boxes. User can
- Update any of the editable data.
- Add a new plant/animal and assign new color, height, comments data.
I should be able to apply the new data to the node (update the node). I see that on UI new data is getting displayed but when I inspect element - value is not updated??
I should be able to take the entire fancy tree data and send it in request.
I tried auto selecting all nodes and getting selected nodes, I only get the titles (Lily/Rabbit) , I do not get the updated color, height and comments.
I am not sure how to trigger edit (modify) on a key-value pair inside a child.
Also, when I move the children (in level - 3) - Is there a way to auto-correct the Index Hierarchy?
Any help is greatly appreciated.
Highlighting questions again :
- Update the Key-Value data in the child node
- Read the entire fancytree with new data and send it in request
- Auto-correct Index Hierarchy when moved up/down or moved under different parent