From f47e8ac6a1e4c85b6eca45a03ab26bb1e258b50e Mon Sep 17 00:00:00 2001 From: Krzysztof Magiera Date: Fri, 16 Oct 2015 03:24:38 -0700 Subject: [PATCH] Instrumentation test for native listview component. Differential Revision: D2549707 fb-gh-sync-id: c9ff379383853c198274778e99a72b313d9dbda9 --- .../ScrollView/RecyclerViewBackedScrollView.android.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Libraries/Components/ScrollView/RecyclerViewBackedScrollView.android.js b/Libraries/Components/ScrollView/RecyclerViewBackedScrollView.android.js index 198a91350..f2999b3b4 100644 --- a/Libraries/Components/ScrollView/RecyclerViewBackedScrollView.android.js +++ b/Libraries/Components/ScrollView/RecyclerViewBackedScrollView.android.js @@ -12,6 +12,8 @@ var ScrollView = require('ScrollView'); var requireNativeComponent = require('requireNativeComponent'); +var INNERVIEW = 'InnerView'; + /** * Wrapper around android native recycler view. * @@ -63,6 +65,10 @@ var RecyclerViewBackedScrollView = React.createClass({ return this; }, + getInnerViewNode: function(): any { + return React.findNodeHandle(this.refs[INNERVIEW]); + }, + render: function() { var props = { ...this.props, @@ -81,6 +87,7 @@ var RecyclerViewBackedScrollView = React.createClass({ onResponderReject: this.scrollResponderHandleResponderReject, onScroll: this.scrollResponderHandleScroll, style: ([{flex: 1}, this.props.style]: ?Array), + ref: INNERVIEW, }; return (