Skip to content

Broken Playground examples #429

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

Open
downright-development opened this issue Apr 6, 2025 · 1 comment
Open

Broken Playground examples #429

downright-development opened this issue Apr 6, 2025 · 1 comment
Assignees

Comments

@downright-development
Copy link

Describe the bug
Using the default playground provided here - https://codesandbox.io/p/sandbox/react-complex-tree-playground-u5tjs

you can lose access to items by dragging folders under pages.

To Reproduce
Expand the "Desserts" option. Drag Cookie to the root level.
Drag anything under cookie

Expected behavior
Cookie is a leaf node - nothing should be draggable under it.

Screenshots

Screen.Recording.2025-04-05.at.9.45.18.PM.mov

Additional context
Can reproduce in playground directly

@lukasbach
Copy link
Owner

You need to set the prop canDropOnNonFolder to false to get the desired behavior.

People can set this to true to implement special behavior for items being dropped on items that are not considered folders, but if you want to allow drag events only on items that can expand, which are named folders in the terminology of RCT, this needs to be set to false.

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

No branches or pull requests

2 participants