You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tested this with both with react native old and new architecture and got the same issue. The dragging view does not snap back into place. The animation does not work (it stops before finishing). E.g. if you run the KnightMoves example, after dragging the knight and releasing it, the dragged view will stay there and won't snap back. I've narrowed it down to this line:
@gigilibala Temporarily worked for me by commenting finish condition:
animation.start(({ finished }) => {
// Remove the release from tracking, regardless of whether animation finished.
deleteReleaseInRegistry(registry, releaseId);
// Call the snapback end handler, regardless of whether animation of finished.
onSnapbackEnd?.();
// If the animation finished, update the view state for the released view to be inactive.
// if (finished) {
stateDispatch(useDraxState_1.actions.updateViewState({
id: draggedId,
viewStateUpdate: {
dragStatus: types_1.DraxViewDragStatus.Inactive,
hoverPosition: undefined,
grabOffset: undefined,
grabOffsetRatio: undefined,
},
}));
// }
});
Tested this with both with react native old and new architecture and got the same issue. The dragging view does not snap back into place. The animation does not work (it stops before finishing). E.g. if you run the KnightMoves example, after dragging the knight and releasing it, the dragged view will stay there and won't snap back. I've narrowed it down to this line:
react-native-drax/src/hooks/useDraxRegistry.ts
Line 527 in dbedea9
Where the finished value will always be false, hence the view state won't get updated in the drag registry.
Simulator.Screen.Recording.-.iPhone.16.-.2024-11-27.at.09.26.45.mp4
The text was updated successfully, but these errors were encountered: