-
Notifications
You must be signed in to change notification settings - Fork 741
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
add multidimensional reorder #1685
add multidimensional reorder #1685
Conversation
Hey @cjoecker, thanks for your submission! However I think there's a problem here with the |
Hey @mattgperry you are right, I will work on that, so that we can remove both of the props. |
Hey @mattgperry , I removed the Now it is fully responsive. Can you also tell me how to fix the pipeline? It is asking for a |
Any updates on this? Are you still actively working on this PR @cjoecker ? It would be a shame to let this awesome work go to waste. It's a must feature requested from many people. |
The PR is ready. I'm just waiting for the maintainers to review it :) |
I'm currently testing this PR out and I have noticed that there seems to be an issue when there's only one item then an uncaught error is being thrown: At least two children components are necessary. This also goes further that when you try to have something like this e.g.
Then Typescript complains that only a single child has been provided. Additionally, it seems you can't add any additional components like in Reorder.Group directly or use a map + a different Regroup.Item right inside as children. If done thenTypescript fails with
Type 'Element[]' is not assignable to type 'ReactElement<any, string | JSXElementConstructor<any>> | (ReactElement<any, string | JSXElementConstructor<any>> & string)'. |
@TheTimeWalker I made that on purpose here. |
Ah, I see. But wouldn't that break anything when the list only has one item or when |
@TheTimeWalker good point! I just fixed it. |
Hey @cjoecker thanks for your work on this. I'm going to merge it into a branch now and have a play, check tests etc. Hopefully we'll finally have this out soon! |
Hi, have you guys merged this? |
As asked in #1400 , here is a PR to allow multidimensional reorder
For now, the user just needs to give the number of items per row.
In another PR, we can calculate it using the children's refs.
For the docs, do I need to create another PR to adapt it?