@@ -101,6 +101,8 @@ var ScrollViewComponent = React.createClass({
101101 return {
102102 scrollEventThrottle : 50 ,
103103 _onMomentumScrollDelay : 400 ,
104+ renderHeader : function ( ) { return null ; } ,
105+ renderFooter : function ( ) { return null ; } ,
104106 } ;
105107 } ,
106108
@@ -147,26 +149,25 @@ var ScrollViewComponent = React.createClass({
147149 return scrollView && scrollView . getScrollResponder ? scrollView . getScrollResponder ( ) : scrollView ;
148150 } ,
149151
150- _renderHeader : function ( ) {
151- var header = this . props . _renderHeader ? this . props . _renderHeader ( ) : { } ;
152- return header ;
153- } ,
154-
155152 render : function ( ) {
156153 var props = this . _merge ( this . props , {
157- onScroll : this . _onScroll ,
158- // onTouchStart: this._onTouchStart,
159- // onTouchEnd: this._onTouchEnd,
160- onScrollEndDrag : this . _onScrollEndDrag ,
161- onMomentumScrollBegin : this . _onMomentumScrollBegin ,
162- onMomentumScrollEnd : this . _onMomentumScrollEnd ,
163- renderHeader : this . _renderHeader ,
164- } ) ;
154+ onScroll : this . _onScroll ,
155+ // onTouchStart: this._onTouchStart,
156+ // onTouchEnd: this._onTouchEnd,
157+ onScrollEndDrag : this . _onScrollEndDrag ,
158+ onMomentumScrollBegin : this . _onMomentumScrollBegin ,
159+ onMomentumScrollEnd : this . _onMomentumScrollEnd ,
160+ } ) ,
161+
162+ ScrollClass = this . props . scrollClass || ScrollView ,
163+ content = null ;
165164
166- var ScrollClass = this . props . scrollClass || ScrollView ;
167- var content = null ;
168165 if ( ScrollClass === ScrollView ) {
169- content = [ this . _renderHeader ( ) , this . props . children ] ;
166+ content = [
167+ this . props . renderHeader ( ) ,
168+ this . props . children ,
169+ this . props . renderFooter ( ) ,
170+ ] ;
170171 }
171172
172173 return (
0 commit comments