From 6b9674d3dc1dd78458c3de4438b5f055fca2f79d Mon Sep 17 00:00:00 2001 From: Jeremy Clements <79224539+jeclrsg@users.noreply.github.com> Date: Wed, 17 Apr 2024 12:58:47 -0400 Subject: [PATCH] fix(dgrid-shim): max page when pagination counts are unknown When pagination counts are unknown, change the text of the maximum page link to reflect this, rather than the unreasonably large UNKNOWN_NUM_ROWS returned by ESP Signed-off-by: Jeremy Clements <79224539+jeclrsg@users.noreply.github.com> --- packages/dgrid-shim/src/gridHelper.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/dgrid-shim/src/gridHelper.ts b/packages/dgrid-shim/src/gridHelper.ts index 1c0f58a4cc..b361ef95b6 100644 --- a/packages/dgrid-shim/src/gridHelper.ts +++ b/packages/dgrid-shim/src/gridHelper.ts @@ -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];