Tree Drag & Drop: Child item can't be moved to root if only one root item #9796
Unanswered
rothsandro
asked this question in
Q&A
Replies: 1 comment 3 replies
-
|
I spent a bit of time looking at this today. I see the issue as well, following your instructions, but I'm not sure where the issue is yet. Because it works if there are other items, it doesn't seem to be related to the drop above being too thin because that space is the same in both cases. In other places I can drop before a parent key, so it's likely not related to that. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm using the RAC Tree component with drag & drop support. If the tree contains a single root item with children, I can't move the child item to the root before the current root item.
The drag indicator doesn't appear but dropping the item at the ~right position calls
onMovewith an invalid target keyreact-aria-1. The child can be moved to the root after the root item and from there (with two items in the root) it can be moved before the root item.I opened the Tree - Moving items demo in Stackblitz and changed the data to have a single root item. It can be reproduced here.
rac-tree-dnd.mov
Repro: https://stackblitz.com/edit/csdzuzrl?file=src%2FExample.tsx
Is my code (and the demo in the docs) wrong or is this a bug in React Aria?
Regards,
Sandro
Beta Was this translation helpful? Give feedback.
All reactions