Skip to content

Commit 667d8d5

Browse files
committed
Bug fixed
solved allLoadedView cannot ender correctly
1 parent ed5721d commit 667d8d5

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This is an **enhanced FlatList** with all excellent extra features, comparing to
1313
**Quick installation**
1414

1515
- If on react-native < 0.43: `yarn add [email protected]`
16-
- If on react-native >= 0.43 `yarn add [email protected].5`
16+
- If on react-native >= 0.43 `yarn add [email protected].6`
1717

1818

1919

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-ultimate-listview",
3-
"version": "3.1.5",
3+
"version": "3.1.6",
44
"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.",
55
"main": "index.js",
66
"scripts": {

src/ultimateListView.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ export default class UltimateListView extends Component {
253253

254254
postPaginate = (rows = [], pageLimit) => {
255255
this.setPage(this.getPage() + 1);
256-
let mergedRows = null;
256+
let mergedRows;
257257
let paginationStatus;
258258
if (rows.length === 0) {
259259
paginationStatus = PaginationStatus.allLoaded;
@@ -265,8 +265,8 @@ export default class UltimateListView extends Component {
265265
this.updateRows(mergedRows, paginationStatus);
266266
};
267267

268-
updateRows = (rows = [], paginationStatus) => {
269-
if (rows !== null) {
268+
updateRows = (rows, paginationStatus) => {
269+
if (rows) {
270270
this.setRows(rows);
271271
this.setState({
272272
dataSource: rows,
@@ -275,6 +275,7 @@ export default class UltimateListView extends Component {
275275
});
276276
} else {
277277
this.setState({
278+
dataSource: this.getRows().slice(),
278279
isRefreshing: false,
279280
paginationStatus: paginationStatus
280281
});

0 commit comments

Comments
 (0)