Last active
July 8, 2018 21:21
-
-
Save bogoslavskiy/18d2a975e8de0298fa062b243c140f4a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FlatListHelper extends React.PureComponent { | |
[...] | |
_onScrollEndDrag = e => { | |
if(e.nativeEvent.velocity.y == 0) { | |
this.props.animation.handleIntermediateState(this.scrollToOffset); | |
} | |
}; | |
[...] | |
render() { | |
[...] | |
return ( | |
<AnimatedFlatList | |
[...] | |
onScrollEndDrag={this._onScrollEndDrag} | |
[...] | |
/> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment