react-spectrum
e4ec6b4e - feat(RAC): Tree drag and drop (#7692)

Commit
164 days ago
feat(RAC): Tree drag and drop (#7692) * [5574] - add moveBefore and moveAfter to useTreeData * add docs * remove onlys * remove console logs * [wip] add intial tree drag and drop * useTreeData - add getDescendantKeys method which is used to determine if a parent node can be dropped into its children * revert packlog json change * feat: Add moveBefore and moveAfter to useTreeData * updates + story * remove RSP TreeView dnd for now * cleanup * fix story * lint * lint * lint * ts * fix listMapData destructure * allow expanding during dragging * lint * review comments * fixes * lint * update story to use useTreeData * handle dropPosition === 'on' case * set shouldSelectOnPressUp on item if dragging enabled * update useTreeData move/moveBefore/moveAfter implementations * fix stories * typescript * add drag button * fix nested item drop button in story * prevent dropping items onto themselves or their descendants * add tests and fix broken ones * remove dead code * fix lost items when moving to root * fix tests --------- Co-authored-by: GitHub <snowystinger@gmail.com> Co-authored-by: Reid Barber <reid@reidbarber.com> Co-authored-by: Robert Snow <rsnow@adobe.com>
Author
Parents
Loading