Support custom ScrollView implementations in ListView
Summary: See e9f64b2f3f (commitcomment-16166567)
Reviewed By: tadeuzagallo
Differential Revision: D2953787
fb-gh-sync-id: b8978b3fa6ae9e848be918cc707335a06ea56cf6
shipit-source-id: b8978b3fa6ae9e848be918cc707335a06ea56cf6
This commit is contained in:
parent
44ea74c2c7
commit
b516976457
|
@ -231,14 +231,18 @@ var ListView = React.createClass({
|
|||
|
||||
/**
|
||||
* Provides a handle to the underlying scroll responder.
|
||||
* Note that the view in `SCROLLVIEW_REF` may not be a `ScrollView`, so we
|
||||
* need to check that it responds to `getScrollResponder` before calling it.
|
||||
*/
|
||||
getScrollResponder: function() {
|
||||
return this.refs[SCROLLVIEW_REF] &&
|
||||
return this.refs[SCROLLVIEW_REF] &&
|
||||
this.refs[SCROLLVIEW_REF].getScrollResponder &&
|
||||
this.refs[SCROLLVIEW_REF].getScrollResponder();
|
||||
},
|
||||
|
||||
scrollTo: function(...args) {
|
||||
this.refs[SCROLLVIEW_REF] &&
|
||||
this.refs[SCROLLVIEW_REF] &&
|
||||
this.refs[SCROLLVIEW_REF].scrollTo &&
|
||||
this.refs[SCROLLVIEW_REF].scrollTo(...args);
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue