-
Notifications
You must be signed in to change notification settings - Fork 143
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] Disable swapping if only 1 item exist #68
Comments
Hey @Crinchy! I might be wrong, but I think keeping it draggable would be the more expected behavior, especially in cases where you can add slots dynamically. It would indicate that the items in the section have a dragging feature. If you want to disable it when there’s one item, you can call However, if most people prefer disabling it, I’m totally okay with that too! Thanks for the suggestion! |
Okay @TahaSh makes sense for me. But This is the React Component in my next.js project:
|
@Crinchy I found the issue. It was related to react's strict mode. I'll fix it soon, thanks! |
Hey @TahaSh 👋, any eta on this? Thanks buddy |
@Crinchy It should be fixed now :) (update to v0.4.0) |
Thanks @TahaSh, yeah i can confirm it, its fixed ❤️ |
Hey 👋
Currently you can swap even only 1 item exist, which makes absolutely no sense for me and it would be ugly to wrap the swapy init into an if statement. So i would disable the swap if only 1 item exists in the container.
I hope you see it the same way as I do. ❤️
The text was updated successfully, but these errors were encountered: