react-native-draggable-flatlist
react-native-draggable-flatlist copied to clipboard
A way to prevent dragging above a certain index
Is your feature request related to a problem? Please describe.
I'm using stickyHeaderIndices
for headers and need a way to prevent dragging an item above them. Would there be a way to set a constrain or set the bound to after a certain item's index number?
Describe the solution you'd like A way to prevent dragging above a certain index. Ex: startDragIndex={3}, with default 0. And it measures the total height items before startDragIndex and sets the container size?
Describe alternatives you've considered Attempted to nest items in a parent FlatList but that causes issues with auto-scrolling on DraggableFlatList
Additional context
any update on this?
Currently, I'm using to index inside onDragEnd to find out if an item is moving beyond a certain index.
onDragEnd={({ data, from, to }) => {
if(to!=headerIndex) {
//change state data only when **to** index matches the contraints
}
}}
any update on this?
This would be very useful to me :/