Skip to content

Commit

Permalink
Merge pull request #4191 from jeclrsg/fix-dgrid-shim-unknown-page-count
Browse files Browse the repository at this point in the history
fix(dgrid-shim): max page when pagination counts are unknown
  • Loading branch information
GordonSmith authored Apr 19, 2024
2 parents deee15f + 6b9674d commit e39a421
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/dgrid-shim/src/gridHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ export const Pagination = declare([DGridPagination], {
if (total >= UNKNOWN_NUM_ROWS) {
query(".dgrid-page-link:last-child", this.paginationNavigationNode).forEach(function (link) {
domClass.toggle(link, "dgrid-page-disabled", true);
if (parseInt(link.innerText, 10) >= UNKNOWN_NUM_ROWS) {
link.innerText = "???";
}
link.tabIndex = -1;
});
const pageText = query(".dgrid-status", this.paginationNode)[0];
Expand Down

0 comments on commit e39a421

Please sign in to comment.