mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-06 22:44:22 +08:00
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:
committed by
facebook-github-bot-5
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);
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user