Replies: 1 comment
-
When using an UncontrolledEnvironment, your approach of using a custom data provider and manually reacting to change-item-children events is the intended way. This library manages rendering the tree to the DOM and implementing user interactions, but managing the tree data is out of scope of this library and is up to the consumer. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there a quick way to return a JSON or array of the tree in an UncontrolledEnvironment once some event has occurred? I feel like this is obvious but cannot seem to find the answer. I'm using UncontrolledEnvironment because it's too time consuming to implement drag-and-drop functionality in ControlledEnvironment.
Essentially each time the tree changes, I want to extract a JSON of it (indeed just the items and their location) to save to a backend db.
I implemented a workaround using a custom data provider and extracting what I need from the onChangeItemChildren async but there must be a quicker way?
Beta Was this translation helpful? Give feedback.
All reactions