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

Parent component's native events affect react-dnd #3598

Open
YingJian-hu opened this issue Oct 17, 2023 · 3 comments
Open

Parent component's native events affect react-dnd #3598

YingJian-hu opened this issue Oct 17, 2023 · 3 comments

Comments

@YingJian-hu
Copy link

Is your feature request related to a problem? Please describe.
I have a parent component that uses the native onDragStart method, and my child component is wrapped with react-dnd. When dragging in the child component, the event bubbles up to the parent component. How do I prevent the event from bubbling in the useDrag of the child component?

Describe the solution you'd like
Subcomponents have interfaces to prevent events from bubbling up

Describe alternatives you've considered
no plan

Additional context
Only the child components need to be wrapped with react-dnd, the parent component does not need to be wrapped

@YingJian-hu
Copy link
Author

@eukitout-qq
Copy link

I met an issue looks like yours. In the parent component, I have a child component wrapped with react-dnd, but another child component uses the navtive "draggable=true & onDragStart", but this component is not working, try to drag it, no response.

@eukitout-qq
Copy link

I met an issue looks like yours. In the parent component, I have a child component wrapped with react-dnd, but another child component uses the navtive "draggable=true & onDragStart", but this component is not working, try to drag it, no response.

oh, I found my answer here: #3304

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