Skip to content

Commit

Permalink
Bug fixed
Browse files Browse the repository at this point in the history
solved allLoadedView cannot ender correctly
  • Loading branch information
gameboyVito committed Jul 18, 2017
1 parent ed5721d commit 667d8d5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This is an **enhanced FlatList** with all excellent extra features, comparing to
**Quick installation**

- If on react-native < 0.43: `yarn add react-native-ultimate-listview@3.0.2`
- If on react-native >= 0.43 `yarn add react-native-ultimate-listview@3.1.5`
- If on react-native >= 0.43 `yarn add react-native-ultimate-listview@3.1.6`



Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-ultimate-listview",
"version": "3.1.5",
"version": "3.1.6",
"description": "A high performance FlatList providing customised pull-to-refresh | auto-pagination & infinite-scrolling | gridview layout | swipeable-row. The truly ultimate version that I have done the most tricky part for you, just simply follow the instructions shown below to put it in your app.",
"main": "index.js",
"scripts": {
Expand Down
7 changes: 4 additions & 3 deletions src/ultimateListView.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ export default class UltimateListView extends Component {

postPaginate = (rows = [], pageLimit) => {
this.setPage(this.getPage() + 1);
let mergedRows = null;
let mergedRows;
let paginationStatus;
if (rows.length === 0) {
paginationStatus = PaginationStatus.allLoaded;
Expand All @@ -265,8 +265,8 @@ export default class UltimateListView extends Component {
this.updateRows(mergedRows, paginationStatus);
};

updateRows = (rows = [], paginationStatus) => {
if (rows !== null) {
updateRows = (rows, paginationStatus) => {
if (rows) {
this.setRows(rows);
this.setState({
dataSource: rows,
Expand All @@ -275,6 +275,7 @@ export default class UltimateListView extends Component {
});
} else {
this.setState({
dataSource: this.getRows().slice(),
isRefreshing: false,
paginationStatus: paginationStatus
});
Expand Down

0 comments on commit 667d8d5

Please sign in to comment.