nuclearpasta / react-native-drax

A drag-and-drop system for React Native
MIT License
554 stars 69 forks source link

Cancel drop based on certain criteria #123

Open frankbolviken opened 2 years ago

frankbolviken commented 2 years ago

I have some requirements like that an item cannot be dropped if certain criteria are not met based on the dragged item and the position it is dropped to. Is it possible to implement something like this with the current solution?

lafiosca commented 2 years ago

I think there may be more than one way to accomplish this based on the specifics of your situation. I would consider seeing if you can dynamically set the receptive prop to false depending on what’s being dragged, using the drag lifecycle events on the dragged items or a monitor to determine that.