Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,13 @@ const { DragProvider, useDragContext } = createProvider('Drag')<
prevActiveItemKey.value = null;
activeItemDropped.value = true;
updateLayer?.(LayerState.IDLE);
stableOnActiveItemDropped({ fromIndex, key, toIndex });
stableOnActiveItemDropped({
fromIndex,
indexToKey: indexToKey.value,
key,
keyToIndex: keyToIndex.value,
toIndex
});
}, dropAnimationDuration.value);
},
[
Expand Down
9 changes: 1 addition & 8 deletions packages/react-native-sortables/src/types/props/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,7 @@ export type OrderChangeParams = {
};

/** Parameters provided when the active item is dropped */
export type ActiveItemDroppedParams = {
/** Unique identifier of the dropped item */
key: string;
/** Original index of the dropped item */
fromIndex: number;
/** Final index where the item was dropped */
toIndex: number;
};
export type ActiveItemDroppedParams = DragEndParams;

/**
* Callback function called when the item drag starts
Expand Down
Loading