Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions GiftedListView.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ var GiftedListView = React.createClass({
this._onRefresh({external: true});
},

_onRefresh(options = {}) {
_onRefresh(options = {refresh: true}) {
if (this.isMounted()) {
this.setState({
isRefreshing: true,
Expand All @@ -236,7 +236,7 @@ var GiftedListView = React.createClass({
this.setState({
paginationStatus: 'fetching',
});
this.props.onFetch(this._getPage() + 1, this._postPaginate, {});
this.props.onFetch(this._getPage() + 1, this._postPaginate, {paginate: true});
}
},

Expand All @@ -252,7 +252,7 @@ var GiftedListView = React.createClass({
if(this.props.distinctRows){
mergedRows = this.props.distinctRows(mergedRows);
}

this._updateRows(mergedRows, options);
},

Expand Down Expand Up @@ -305,6 +305,7 @@ var GiftedListView = React.createClass({
colors={this.props.refreshableColors}
progressBackgroundColor={this.props.refreshableProgressBackgroundColor}
size={this.props.refreshableSize}
style={this.props.refreshableStyle}
tintColor={this.props.refreshableTintColor}
title={this.props.refreshableTitle}
/>
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ var Example = React.createClass({
* Should be replaced by your own logic
* @param {number} page Requested page to fetch
* @param {function} callback Should pass the rows
* @param {object} options Inform if first load
* @param {object} options indicates different actions that trigger refreshing
* options: [firstLoad || refresh || paginate || allLoaded]
*/
_onFetch(page = 1, callback, options) {
setTimeout(() => {
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "react-native-gifted-listview",
"version": "0.0.15",
"name": "@mdluo/react-native-gifted-listview",
"version": "0.0.16",
"description": "A ListView with pull-to-refresh, infinite scrolling and more for Android and iOS React-Native apps",
"main": "GiftedListView.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/FaridSafi/react-native-gifted-listview.git"
"url": "git+https://github.com/mdluo/react-native-gifted-listview.git"
},
"keywords": [
"pull-to-refresh",
Expand All @@ -23,10 +23,10 @@
"author": "Farid from Safi",
"license": "MIT",
"bugs": {
"url": "https://github.com/FaridSafi/react-native-gifted-listview/issues"
"url": "https://github.com/mdluo/react-native-gifted-listview/issues"
},
"homepage": "https://github.com/FaridSafi/react-native-gifted-listview#readme",
"homepage": "https://github.com/mdluo/react-native-gifted-listview#readme",
"dependencies": {
"react-native-gifted-spinner": "^0.0.4"
"react-native-gifted-spinner": "git+https://github.com/mdluo/react-native-gifted-spinner.git"
}
}