Skip to content
New issue

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

Add rowHitAreaHeight and ignoreDropsOutside props #218

Closed
wants to merge 4 commits into from

Conversation

dutziworks
Copy link

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.

@jameskerr
Copy link
Member

I like the row hit idea. I will think about this in the next version.

@jameskerr jameskerr closed this Feb 6, 2025
@jameskerr jameskerr added this to the Version 4 milestone Feb 6, 2025
@jameskerr
Copy link
Member

The fix for dropping outside the tree still firing is fixed in #297 Should be released soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants