Skip to content

Commit 708f99a

Browse files
authored
Remove opacity from Swipeable action panels (#4271)
## Description Row position and `opacity` depend on different SharedValue, which may lead to them animating out of sync. Since we already have `overflow: hidden;` setting `opacity` is not required. Fixes #3897 ## Test plan Tested on the existing Swipeable examples.
1 parent cd952bf commit 708f99a

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

packages/react-native-gesture-handler/src/components/ReanimatedSwipeable/ReanimatedSwipeable.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,6 @@ const Swipeable = (props: SwipeableProps) => {
392392

393393
const leftActionAnimation = useAnimatedStyle(() => {
394394
return {
395-
opacity: showLeftProgress.value === 0 ? 0 : 1,
396395
// Both action containers use `absoluteFill` and overlap, so the
397396
// inactive one must not intercept touches meant for the visible
398397
// actions.
@@ -426,7 +425,6 @@ const Swipeable = (props: SwipeableProps) => {
426425

427426
const rightActionAnimation = useAnimatedStyle(() => {
428427
return {
429-
opacity: showRightProgress.value === 0 ? 0 : 1,
430428
// Both action containers use `absoluteFill` and overlap, so the
431429
// inactive one must not intercept touches meant for the visible
432430
// actions.

0 commit comments

Comments
 (0)