fix ListView to work with Native Animated.event

Summary:
suggested by janicduplessis in https://github.com/facebook/react-native/pull/9253#issuecomment-247862707
I'm using this in my own apps
Closes https://github.com/facebook/react-native/pull/11339

Differential Revision: D4325343

fbshipit-source-id: f1da26a2107093865f04e1d81245b33482776001
This commit is contained in:
Neo 2016-12-13 20:31:30 -08:00 committed by Facebook Github Bot
parent d926aecd77
commit f8f70d2275
1 changed files with 8 additions and 0 deletions

View File

@ -268,6 +268,14 @@ var ListView = React.createClass({
}
},
getScrollableNode: function() {
if (this._scrollComponent && this._scrollComponent.getScrollableNode) {
return this._scrollComponent.getScrollableNode();
} else {
return ReactNative.findNodeHandle(this._scrollComponent);
}
},
/**
* Scrolls to a given x, y offset, either immediately or with a smooth animation.
*