Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(backend): OData/GraphQL pagination should display warning on empty #159

Merged
merged 1 commit into from
Nov 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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