Skip to content

Commit

Permalink
feat(Infinite): add getItems
Browse files Browse the repository at this point in the history
  • Loading branch information
sculove committed Nov 3, 2017
1 parent 8bcd58a commit d8e6207
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/Infinite.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ export class Infinite extends Component {
}));
this._layout.setSize(this._renderer.getSize());
}
getItems() {
return this._items.pluck("items", 0, this._items.size());
}
getVisibleItems() {
return this._items.pluck("items", this._startCursor, this._endCursor);
}
Expand Down
4 changes: 3 additions & 1 deletion src/InfiniteGrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,9 @@ class InfiniteGrid extends Component {
getGroupKeys(includeCached = false) {
return this._infinite.getGroupKeys(includeCached);
}

getItems(includeCached = false) {
return this._infinite[includeCached ? "getItems" : "getVisibleItems"]();
}
/**
* Destroys elements, properties, and events used on a grid layout.
* @ko 그리드 레이아웃에 사용한 엘리먼트와 속성, 이벤트를 해제한다
Expand Down
1 change: 0 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ var config = {
filename: "[name].js",
library: [pkg.namespace.eg, "InfiniteGrid"],
libraryTarget: "umd",
umdNamedDefine: true
},
externals: {
"@egjs/component" : {
Expand Down

0 comments on commit d8e6207

Please sign in to comment.