react-native-draggable-flatlist icon indicating copy to clipboard operation
react-native-draggable-flatlist copied to clipboard

Dragging item into another item

Open yarinsn opened this issue 3 years ago • 5 comments

Describe the solution you'd like I'd like to be able to:

  1. highlight an item when another item is hovering above it
  2. 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

yarinsn avatar Dec 27 '21 22:12 yarinsn

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.

computerjazz avatar Jan 03 '22 18:01 computerjazz

Is there a solution that an element doesn't move anywhere when another element is pointed at it?

ReSenpai avatar Jan 20 '23 10:01 ReSenpai

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

HieronymusLex avatar Oct 25 '23 19:10 HieronymusLex

any updates on this? for those that was able to get this the combining 2 items to work, how did you do it?

willyuanxu avatar Jan 19 '24 22:01 willyuanxu

@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

HieronymusLex avatar Jan 20 '24 08:01 HieronymusLex