We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The getItem() function returns undefined for each child in the moved parent node within the root.
getItem()
The getItem() function returns the child after moving the parent node.
getItem() returns undefined
Add all removed children in nodeMap for the moved node in the moving function (probably here)
No response
const tree = useTreeData({ initialItems: [ { id: 1, children: [], }, { id: 2, children: [], }, { id: 3, children: [ { id: 30, children: [], }, { id: 31, children: [], }, ], }, ], getKey: (item) => item.id, getChildren: (item) => item.items, }); tree.getItem(31) // return node:31 tree.move(3, null, 0) tree.getItem(31) // return undefined
react-stately: 3.36.1
Chrome
macOS
The text was updated successfully, but these errors were encountered:
Thanks, I was able to reproduce in a unit test, I've fixed it in #7854 which should be pulled into our tree drag and drop pr
Sorry, something went wrong.
No branches or pull requests
Provide a general summary of the issue here
The
getItem()
function returns undefined for each child in the moved parent node within the root.🤔 Expected Behavior?
The
getItem()
function returns the child after moving the parent node.😯 Current Behavior
getItem()
returns undefined💁 Possible Solution
Add all removed children in nodeMap for the moved node in the moving function (probably here)
🔦 Context
No response
🖥️ Steps to Reproduce
Version
react-stately: 3.36.1
What browsers are you seeing the problem on?
Chrome
If other, please specify.
No response
What operating system are you using?
macOS
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response
The text was updated successfully, but these errors were encountered: