Skip to content

Commit

Permalink
fix(react-infinitegrid): fix updateItems for no item (#276)
Browse files Browse the repository at this point in the history
* fix(react-infinitegrid): fix updateItems
fix updateItems for no item

* skip: apply review

* fix(react-infinitegrid): update package version
  • Loading branch information
daybrush committed Mar 27, 2019
1 parent 24518ae commit 6891e17
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/react-infinitegrid/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@egjs/react-infinitegrid",
"version": "1.5.0",
"version": "1.5.1",
"description": "A react component that can easily use egjs-infinitegrid",
"types": "declaration/index.d.ts",
"module": "dist/esm/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-infinitegrid/src/InfiniteGrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export default class InfiniteGrid extends Component {
this._manager && this._manager.destroy();
}
getItems(includeCached) {
return includeCached ? this._items.pluck("items") : this._infinite.getVisibleItems();
return includeCached ? this._items.pluck("items") : this._getVisibleItems();
}
getStatus(startKey = "", endKey = "") {
const state = Object.assign({}, this.state);
Expand Down
4 changes: 2 additions & 2 deletions packages/react-infinitegrid/test/InfiniteGrid.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ describe(`test layout`, function () {
const items2 = rendered.getItems();

// group 1's items
rendered._infinite.setCursor("start", 1);
rendered._infinite.setCursor("end", 1);
rendered.state.startIndex = 1;
rendered.state.endIndex = 1;
const items3 = rendered.getItems();

// Then
Expand Down

0 comments on commit 6891e17

Please sign in to comment.