I encountered this issue when I made a NestableDraggableFlatList with an array that looks like [{title: 'a', key: 0}, {title: 'b', key: 1}, {title: 'c', key: 2}]. I noticed that I could never drag the first element, but it did enlarge as it was wrapped in a ScaleDecorator. I realized it's because of this line in the source code, which doesn't enable dragging if your key is falsy:
I encountered this issue when I made a
NestableDraggableFlatList
with an array that looks like[{title: 'a', key: 0}, {title: 'b', key: 1}, {title: 'c', key: 2}]
. I noticed that I could never drag the first element, but it did enlarge as it was wrapped in aScaleDecorator
. I realized it's because of this line in the source code, which doesn't enable dragging if your key is falsy:https://github.com/computerjazz/react-native-draggable-flatlist/blob/ebfddc4877e8f65d5391a748db61b9cd030430ba/src/components/DraggableFlatList.tsx#L121
Instead, it should check if
activeKey
is null or undefined.My current fix is to 1-index my keys rather than 0-index.