nuclearpasta / react-native-drax

A drag-and-drop system for React Native
MIT License
555 stars 68 forks source link

Feature Request: Add callback on DraxList for when the dragged item changed hover index #25

Closed special-character closed 4 years ago

special-character commented 4 years ago

Thanks for the awesome project! It has already been the best drag and drop library that I have seen for react native.

I am using the DraxList to re-order my items and want to provide haptic feedback whenever the item is dragged to a new hover position. i.e. When dragging and item down the list I want to be able to know every step down the list it is dragged before it is released at the final position.

I will take a look at creating a PR for this. I think it should be straightforward given the amount of event hooks that are available.

lafiosca commented 4 years ago

Thank you. I had intended to explore this as well, but the library has not been a priority for me recently. I think it would be a valuable feature.

lafiosca commented 4 years ago

@special-character I created a branch from your work tonight and elaborated on it pretty significantly. Please take a look at #42 and see if it works for your needs. I haven't documented it yet, other than the comments.

special-character commented 4 years ago

@lafiosca Thanks for doing that! As far as I can tell, this looks like what we were shooting for on having those callbacks. I added one question on that PR but I think the start, end, and position changed callbacks were the big things we needed.

lafiosca commented 4 years ago

Closed by #42 and will be in next release