Skip to content

Commit 368102a

Browse files
committed
Support for listviews with sections and further new features...
Adding support for 1) listviews with sections by setting the property "withSections" to "true" and specifying a method for renderSectionHeader 2) Triggering a refresh from external by adding "onRefresh()" which calls "_onRefresh()" with an additional parameter 3) Calling "_onFetch()" with a third parameter called "options" which is an object which is currently either {external: true} or {initial: true} or {}, depending on whether the call of the _onFetch() method was triggered from external (i.e. by calling onRefresh()), was the initial creation of the listview (i.e. from componentDidMount) or any other call.
1 parent bf33332 commit 368102a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

GiftedListView.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ var GiftedListView = React.createClass({
7070
refreshable: true,
7171
refreshableViewHeight: 50,
7272
refreshableDistance: 40,
73-
onFetch(page, callback) { callback([]); },
73+
onFetch(page, callback, options) { callback([]); },
7474

7575
paginationFetchigView() {
7676
return (
@@ -241,7 +241,7 @@ var GiftedListView = React.createClass({
241241
this.setState({
242242
paginationStatus: 'fetching',
243243
});
244-
this.props.onFetch(this._getPage() + 1, this._postPaginate);
244+
this.props.onFetch(this._getPage() + 1, this._postPaginate, {});
245245
},
246246

247247
_postPaginate(rows = [], options = {}) {

0 commit comments

Comments
 (0)