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

Have an example in the docs that illustrates dragging multiple elements. #590

Closed
nikhilbaradwaj opened this issue Nov 30, 2016 · 13 comments
Closed
Labels

Comments

@nikhilbaradwaj
Copy link

While the thread #14 started by @gaearon might not be implemented anytime soon, I feel like a workaround approach can be illustrated in the docs if someone wants to use react-dnd for dragging multiple elements.

@nikhilbaradwaj
Copy link
Author

If this is something worth doing, I would love to write the example and submit a PR.

@oberoi-ishant
Copy link

oberoi-ishant commented Jan 25, 2017

@nikhilbaradwaj If you have a working example of selecting multiple elements for drag n drop, can you please share it?

@dangreenisrael
Copy link

@nikhilbaradwaj That would be amazing

@GreGGus
Copy link

GreGGus commented Apr 27, 2017

@nikhilbaradwaj

@pavel06081991
Copy link

pavel06081991 commented May 17, 2017

@nikhilbaradwaj, Yeah, we would appreciate it

@nikhilbaradwaj
Copy link
Author

@pavel06081991 @dangreenisrael @ishantoberoi @GreGGus

Sorry for the late response. The code example for multi-select drag and drop is here - https://github.com/nikhilbaradwaj/ReactMultiDnD

You can test the app here - https://nikhilbaradwaj.github.io/ReactMultiDnD/

@oberoi-ishant
Copy link

@nikhilbaradwaj Thank You.

@melvynhills
Copy link

melvynhills commented Mar 1, 2018

If anyone's interested, I implemented a multiple drag / grid view: https://codesandbox.io/s/9j897k0mwy.
You can use cmd/ctrl and shift keys to select multiple items, then drag them around the grid and insert them anywhere.

This is still a demo, but I might package it in a component later.

@stale
Copy link

stale bot commented Jul 6, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jul 6, 2019
@stale stale bot closed this as completed Jul 13, 2019
@Raduuu
Copy link

Raduuu commented Sep 24, 2019

If anyone's interested, I implemented a multiple drag / grid view: https://codesandbox.io/s/9j897k0mwy.
You can use cmd/ctrl and shift keys to select multiple items, then drag them around the grid and insert them anywhere.

This is still a demo, but I might package it in a component later.

Any progress on this? :D

@znwang25
Copy link

znwang25 commented Dec 6, 2020

In case anyone is looking for an example using the new API. Here is my current solution with react-dnd based on @melvynhills's codesandbox. I rewrote the code using new APIs and react hooks.

You can try the live demo here.

I also implemented @nikhilbaradwaj's solution using new APIs and react hooks, you can check out the codesandbox here.

@hanalice
Copy link

hanalice commented Jan 4, 2022

@melvynhills you are so great!

@dyeprey
Copy link

dyeprey commented Feb 17, 2023

i think this is old but is there documentation where this can be implemented in newer version of react-dnd or using functional component?

thanks.

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

No branches or pull requests

10 participants