0

I want to be able to bring a table up to a certain height when a condition is matched. How do I manually set the value of dy? this.state.drag.y returns an object. If it were a simple value, I could manually set it, but how do I set dy manually in this scenario?

 onPanResponderMove: (e, gestureState) => {
      return Animated.event([null, {
        dy: this.state.drag.y,
      }])(e, gestureState)
    },
Purnima Naik
  • 419
  • 1
  • 5
  • 16

1 Answers1

0

Figured it out-

   return Animated.event([null, {
         dy: this.state.drag.setValue({ x: 0, y: "value" }),
       }])(e, gestureState)

where value can be anything you want to set manually.

Purnima Naik
  • 419
  • 1
  • 5
  • 16