react-native-draggable-flatlist
react-native-draggable-flatlist copied to clipboard
Dragging item into another item
Describe the solution you'd like I'd like to be able to:
- highlight an item when another item is hovering above it
- get the index of the item that's being hovered over on release
Describe alternatives you've considered currently trying to go over all the viewable items' positions to know which one is being hovered over and do something accordingly on release
Items are not really "hovered over" in this package, they move out of the way so that the hovering item can be dropped in their place. That said, you can use onPlaceholderIndexChange
to determine the index that the active item is hovering over.
Is there a solution that an element doesn't move anywhere when another element is pointed at it?
as a workaround, is there a way we can determine whether 2 items are overlapping by some amount? My use case is to combine 2 items
any updates on this? for those that was able to get this the combining 2 items to work, how did you do it?
@willyuanxu I had a button to enter a "combine mode" then the user taps the list item they wish to combine with. I think it actually ended up creating a more intuitive UI in the end with appropriate highlighting when in combine mode