From f8f70d22757ba3d2877954706d93efcc9c0fac3b Mon Sep 17 00:00:00 2001 From: Neo Date: Tue, 13 Dec 2016 20:31:30 -0800 Subject: [PATCH] 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 --- Libraries/CustomComponents/ListView/ListView.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Libraries/CustomComponents/ListView/ListView.js b/Libraries/CustomComponents/ListView/ListView.js index 31512c3f7..81e5aadd2 100644 --- a/Libraries/CustomComponents/ListView/ListView.js +++ b/Libraries/CustomComponents/ListView/ListView.js @@ -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. *