Item order in controlled tree #92
Unanswered
damienallen
asked this question in
Q&A
Replies: 1 comment
-
My apologies, this was caused by how I was dynamically creating titles. A bug unrelated to the react-complex-tree library. I don't seem to be able to delete the question. |
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
-
I'm having trouble with drag-and-drop ordering with a controlled tree. As far as I can tell, the ordering should be based on the order of the
.children
array in each tree item based on this function:https://github.com/lukasbach/react-complex-tree/blob/main/packages/core/src/tree/getItemsLinearly.ts#L11:L17
However, this is not the behavior I see. The tree is re-registered with the updated children array, but the rendered order stays the same. I'm sorry if I missed something in the documentation, but I was unable to determine with certainty how the ordering is determined in the controlled case.
I'm using the latest version as of writing: v1.1.9
Beta Was this translation helpful? Give feedback.
All reactions