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

using 3rd party library #2709

Closed
megarg opened this issue Aug 5, 2020 · 2 comments
Closed

using 3rd party library #2709

megarg opened this issue Aug 5, 2020 · 2 comments

Comments

@megarg
Copy link

megarg commented Aug 5, 2020

I am trying to figure out how to use 3rd party library as a drag source and also as drag target. Use case would be using reactstrap "Container" as a target and dropping "Row" or other components inside it to build a page

I reviewed issue#
#347

But it did not answer completely.
Q1. Can you also use 3rd part library as a drag target.
Q2. Looks like findDOMNode does not work on functional components. How to do have drag/drop with some 3rd party components if they are functional?

@leftdevel
Copy link

The only requirement for react-dnd to work is to be able to attach a ref to a dom node. Since only primitive react components make use of refs then the library you use must somehow forward it from their rich component to the inner wrapping element. For reactstrap they allow you to pass a innerRef prop.

see https://reactstrap.github.io/components/form/

@megarg
Copy link
Author

megarg commented Aug 8, 2020

Thanks a lot. This worked.

@megarg megarg closed this as completed Aug 8, 2020
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