Skip to content

Commit

Permalink
fix(backend): OData/GraphQL pagination should display warning on empty (
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiscoding authored Nov 16, 2020
1 parent 88c70d8 commit 1c6ada2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ describe('Slick-Vanilla-Grid-Bundle Component instantiated via Constructor', ()
component.paginationOptions = mockPagination;

expect(component.paginationOptions).toEqual({ ...mockPagination, totalItems: 0 });
expect(paginationSrvSpy).toHaveBeenCalledWith(0);
expect(paginationSrvSpy).toHaveBeenCalledWith(0, true);
});

it('should set brand new paginationOptions when none previously exist', () => {
Expand All @@ -546,7 +546,7 @@ describe('Slick-Vanilla-Grid-Bundle Component instantiated via Constructor', ()
component.paginationOptions = mockPagination;

expect(component.paginationOptions).toEqual(mockPagination);
expect(paginationSrvSpy).toHaveBeenCalledWith(1);
expect(paginationSrvSpy).toHaveBeenNthCalledWith(2, 1, true);
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ export class SlickVanillaGridBundle {
this._paginationOptions = options;
}
this.gridOptions.pagination = options;
this.paginationService.updateTotalItems(options?.totalItems || 0);
this.paginationService.updateTotalItems(options?.totalItems || 0, true);
}

get isDatasetInitialized(): boolean {
Expand Down

0 comments on commit 1c6ada2

Please sign in to comment.