Skip to content

Commit b4b7f82

Browse files
MatiPl01Copilot
andauthored
Update packages/react-native-sortables/src/providers/shared/hooks/useItemZIndex.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 885247d commit b4b7f82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/react-native-sortables/src/providers/shared/hooks/useItemZIndex.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default function useItemZIndex(
2323
}
2424

2525
const realIndex = keyToIndex.value[key] ?? 0;
26-
const orderZIndex = isStackingOrderDesc ? itemCount - realIndex : realIndex;
26+
const orderZIndex = isStackingOrderDesc ? itemCount - realIndex - 1 : realIndex;
2727

2828
if (activationAnimationProgress.value > 0) {
2929
if (prevActiveItemKey.value === key) {

0 commit comments

Comments
 (0)