0

I have this piece of code:

    onPanResponderRelease: (e, gesture) => {
        if (gesture.dy > 155) {
           Animated.spring(
              this.state.panBottomModal,
              {
                 toValue: { x: 0, y: 0 },
                 useNativeDriver: false
              },
           ).stop(); 
        } else {
           Animated.spring(
              this.state.panBottomModal,
              {
                 toValue: { x: 0, y: 0 },
                 useNativeDriver: false
              },
           ).start();
        }
     },

as you can see, I want the bottom sheet to be completely hidden once it exceeds gesture.dy > 155. It doesnt hide, instead it just stays at the bottom.

Can someone help on this?

showtime
  • 1
  • 1
  • 17
  • 48

0 Answers0