diff --git a/driver/js/examples/hippy-react-demo/src/components/WaterfallView/index.jsx b/driver/js/examples/hippy-react-demo/src/components/WaterfallView/index.jsx index 4fd51526e5b..27cac7fc5b9 100644 --- a/driver/js/examples/hippy-react-demo/src/components/WaterfallView/index.jsx +++ b/driver/js/examples/hippy-react-demo/src/components/WaterfallView/index.jsx @@ -74,6 +74,7 @@ export default class ListExample extends React.Component { this.onHeaderPulling = this.onHeaderPulling.bind(this); this.onFooterPulling = this.onFooterPulling.bind(this); this.renderBanner = this.renderBanner.bind(this); + this.renderFooter = this.renderFooter.bind(this); this.getItemStyle = this.getItemStyle.bind(this); this.getHeaderStyle = this.getHeaderStyle.bind(this); this.onScroll = this.onScroll.bind(this); @@ -236,10 +237,10 @@ export default class ListExample extends React.Component { } onScroll(obj) { - + console.log('onScroll', obj); } - // render banner(it is not supported on Android yet) + // render banner renderBanner() { if (this.state.dataSource.length === 0) return null; return (); } + // render footer (currently only iOS support) + renderFooter() { + if (this.state.dataSource.length === 0) return null; + return ( + Footer View + ); + } + renderItem(index) { const { dataSource } = this.state; let styleUI = null; @@ -362,7 +381,9 @@ export default class ListExample extends React.Component { style={{ flex: 1 }} onScroll={this.onScroll} renderBanner={this.renderBanner} + renderFooter={this.renderFooter} renderPullHeader={this.renderPullHeader} + renderPullFooter={this.renderPullFooter} onEndReached={this.onEndReached} onFooterReleased={this.onEndReached} onHeaderReleased={this.onHeaderReleased} diff --git a/driver/js/examples/hippy-vue-demo/src/components/native-demos/demo-waterfall.vue b/driver/js/examples/hippy-vue-demo/src/components/native-demos/demo-waterfall.vue index a95b59a450a..5e2df5c8c41 100644 --- a/driver/js/examples/hippy-vue-demo/src/components/native-demos/demo-waterfall.vue +++ b/driver/js/examples/hippy-vue-demo/src/components/native-demos/demo-waterfall.vue @@ -25,17 +25,18 @@

+ +