Skip to content

Commit

Permalink
fix(dgrid-shim): max page when pagination counts are unknown
Browse files Browse the repository at this point in the history
previous fix shouldn't have relied on the text being equal to the total,
but should have ensured the link text is a number

Signed-off-by: Jeremy Clements <79224539+jeclrsg@users.noreply.github.com>
  • Loading branch information
jeclrsg committed Apr 23, 2024
1 parent 84e667a commit 8615155
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/dgrid-shim/src/gridHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ 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) {
if (!isNaN(parseInt(link.innerText, 10))) {
link.innerText = "???";
}
link.tabIndex = -1;
Expand Down

0 comments on commit 8615155

Please sign in to comment.