Open Tragio opened 1 month ago
Hi @Tragio, thanks! Does your use case require the cards to be draggable and then check if they can be swapped on drop, or you need to disable dragging completely on some condition?
If it's the latter, you can use swapy.enable(false)
to disable it and then swapy.enable(true)
to enable it. If it's the former, let me know, and I'll add it 😄
@TahaSh my usecase requires the first scenario you described.
Hi @TahaSh 👋
Thank you for the awesome work. 🚀
Would be awesome to add an
onBeforeSwap
event. In my use case, I want to move the card only when they click on a specific icon.The most generic way I thought and that can also help in other implementations of other people's use is to have an
onBeforeSwap
event. For my use case, I can check in the event if they clicked the icon or not, in that case, I can just return.Thank you very much 🙏