Instrumentation test for native listview component.

Differential Revision: D2549707

fb-gh-sync-id: c9ff379383853c198274778e99a72b313d9dbda9
This commit is contained in:
Krzysztof Magiera 2015-10-16 03:24:38 -07:00 committed by facebook-github-bot-7
parent 3d40d622f9
commit f47e8ac6a1
1 changed files with 7 additions and 0 deletions

View File

@ -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<any>),
ref: INNERVIEW,
};
return (
<NativeAndroidRecyclerView {...props}/>