Skip to content

Instantly share code, notes, and snippets.

@bogoslavskiy
Last active July 8, 2018 21:21
Show Gist options
  • Save bogoslavskiy/18d2a975e8de0298fa062b243c140f4a to your computer and use it in GitHub Desktop.
Save bogoslavskiy/18d2a975e8de0298fa062b243c140f4a to your computer and use it in GitHub Desktop.
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