atlassian / react-beautiful-dnd

Beautiful and accessible drag and drop for lists with React
https://react-beautiful-dnd.netlify.app
Other
33.33k stars 2.55k forks source link

Multi-type Droppable #2114

Open karimbachatec opened 3 years ago

karimbachatec commented 3 years ago

How to create multi-type in droppable element ?

We are developing an application based on drag and drop, that's why we chose react-beautiful-dnd. but we arrived at a blocking is that this package prevents us from using more than one type for a draggable element.

In fact, our application allows us to create forms and each form can be composed by several sections (draggable and droppable at the same time) and inside section we have the possibility of drag an object (draggable element and droppable at the same time), such as the attached piecie screen.

But the problem is that the object can accept the same fields of the element Section, so to simplify it we have two droppable and draggable elements one under the other (object in the section) and both can accept the same element draggable. Problem when we define a draggable element we can only assign one type or in our case we need the same element to be droppable in two different elements.

Conclusion: the problem that your package still cannot detect two droppable elements at the same time if the two elements are inside each other with or without the isDropDisabled option and with the same type or with different types.

"react-beautiful-dnd": "^13.1.0" "react": "^17.0.2"

Capture d’écran 2021-03-21 à 6 48 52 PM
danieldelcore commented 3 years ago

Hi @karimbachatec can you share some more information so we can get you the right information? Can you share what you're trying to do specifically? What do you mean by multi-type?

jessiesanford commented 3 years ago

I'm also having this issue I think, trying to drag lane draggables into both scene and mode droppables. I've setup a demo of my code here:

https://codesandbox.io/s/brave-poitras-dzpb2?file=/src/App.js

karimbachatec commented 3 years ago

Hello, thank you for replying me. I tried the code that you have sent but it has an error. can you explain more about your solution or give me an example if you can.

Le mer. 24 mars 2021 à 20:40, jessiesanford @.***> a écrit :

I'm also having this issue I think, trying to drag lane draggables into both scene and mode droppables. I've setup a demo of my code here:

https://codesandbox.io/s/brave-poitras-dzpb2?file=/src/App.js

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/atlassian/react-beautiful-dnd/issues/2114#issuecomment-806114814, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARF726IF7HDM62LNOSWBYGDTFI54HANCNFSM4ZGKYJZA .