-
Notifications
You must be signed in to change notification settings - Fork 983
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
Feature Request: Drag and drop in a Grid #4
Comments
Yeah, the |
+1! |
1 similar comment
+1! |
+1! |
+1 |
2 similar comments
+1 |
+1 |
+1. I'll do some research in the coming weeks and look into a solution. Need to familiarize myself with the library source code a bit and then take a stab. If anyone started any work on this, would be good to hop in and not waste any dev time |
Hi all, just stumbled upon this issue. I currently use a modified version of this lib that works in a grid. I can probably whip up a PR somewhere next week. |
Feature: Grid support (addresses #4)
Great news, Huge shout-out to @richmeij for all his efforts to make this happen ❤️ |
Hi all, I cant seem to get the grid to work. I wasn't sure if i was adding axis="xy" at the wrong element or what, so i added to every element haha. |
Hi @jaspersorrio, you only need the axis prop on the SortableContainer. All that remains is then displaying the items in a grid. See here: https://jsfiddle.net/9j3khf25/1/ |
Awesome! Thanks @richmeij ! Also was wondering if the source code to https://clauderic.github.io/react-sortable-hoc is availabe? If so where can we find them? |
@jaspersorrio most examples are available locally by running There's also an examples folder you can take a look at: https://github.com/clauderic/react-sortable-hoc/tree/master/examples |
Hi @clauderic! I thought I'll create a standing issue incase anyone else is interested in working on this or has thoughts as well.
The feature request: Be able to drag and drop across axis, i.e., in a grid of any sort. Currently, the library only works one axis at a time.
Based on conversations with @clauderic, I looked into the issue a little bit more and it seems like the changes are only limited to SortableContainer and that too, mostly around calculating offset and managing the translate3d function. I am still trying to familiarize myself with how they really work.
I also imagine we'll need to also add a new prop or modify 'axis' prop to reflect the three choices - x, y or xy.
The text was updated successfully, but these errors were encountered: