@@ -47,7 +47,7 @@ class FastScroll extends React.Component {
4747
4848 onThumbDrag ( event , gesture ) {
4949 const { data, itemHeight, thumbHeight, viewportHeight } = this . props ;
50- // Animated.event([null, { dy: this.position.y }])(event, gesture);
50+ // Animated.event([null, { dy: this.position.y }], { useNativeDriver: true } )(event, gesture);
5151 this . position . setValue ( { x : 0 , y : gesture . moveY } ) ;
5252 const thumbOffset = this . position . __getValue ( ) . y ;
5353 const lastIndex = Math . floor ( ( data . length * itemHeight - viewportHeight ) / itemHeight ) + 1 ;
@@ -75,7 +75,8 @@ class FastScroll extends React.Component {
7575 const { flashDuration, rightOffset } = this . props ;
7676 Animated . timing ( this . state . scrollBar , {
7777 toValue : ScreenWidth - rightOffset ,
78- duration : flashDuration
78+ duration : flashDuration ,
79+ useNativeDriver : true
7980 } ) . start ( ) ;
8081 } ;
8182
@@ -89,7 +90,8 @@ class FastScroll extends React.Component {
8990 const { flashDuration, flashOutDuration } = this . props ;
9091 const flashOut = Animated . timing ( this . state . scrollBar , {
9192 toValue : this . props . hiddenPosition ,
92- duration : flashDuration
93+ duration : flashDuration ,
94+ useNativeDriver : true
9395 } ) ;
9496 setTimeout ( ( ) => flashOut . start ( ) , flashOutDuration ) ;
9597 this . props . onScrollEndDrag ( event , gesture ) ;
0 commit comments