Skip to content
This repository was archived by the owner on Jun 1, 2025. It is now read-only.

Commit 9878984

Browse files
Ghislain BeaulacGhislain Beaulac
authored andcommitted
fix OData service incorrect total item in pagination
1 parent e7045e1 commit 9878984

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-slickgrid",
3-
"version": "0.9.0",
3+
"version": "0.9.1",
44
"description": "Slickgrid components made available in Angular",
55
"keywords": [
66
"angular",

src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,9 @@ export class AngularSlickgridComponent implements AfterViewInit, OnDestroy, OnIn
301301
if (!this.gridOptions.pagination) {
302302
this.gridOptions.pagination = (this._gridOptions.pagination) ? this._gridOptions.pagination : null;
303303
}
304-
this.gridOptions.pagination.totalItems = totalCount || dataset.length;
304+
if (this.gridOptions.pagination && totalCount) {
305+
this.gridOptions.pagination.totalItems = totalCount;
306+
}
305307
this.gridPaginationOptions = this.mergeGridOptions();
306308
}
307309
if (this.grid && this._gridOptions.enableAutoResize) {

0 commit comments

Comments
 (0)