react-arborist icon indicating copy to clipboard operation
react-arborist copied to clipboard

Add `rowHitAreaHeight` and `ignoreDropsOutside` props

Open dutziworks opened this issue 1 year ago • 0 comments

This PR has 3 commits, one that adds props.rowHitAreaHeight, another one that adds props.ignoreDropsOutside and a version bump commit.

rowHitAreaHeight - gives the user control over the height or a row's hit area, when dragging items within it.

By setting this to be the same as rowHeight the user can make the entire row a drop target, losing the top/bottom padding that is mostly useful for sorting the rows.

I needed this to implement a more VSCode like behavior. Hope I didn't re-invent the wheel...

props.ignoreDropsOutside - when dropping a row over another component, React Arborist will still dispatch an onMove event, even though the file didn't drop inside the tree.

By setting this to true, the user can tell Arborist to ignore drops outside the tree.

dutziworks avatar Feb 13 '24 08:02 dutziworks