From 0e04980c670fa7730af1972db21f07ff1ca8ccd4 Mon Sep 17 00:00:00 2001
From: Anton Gilgur <4970083+agilgur5@users.noreply.github.com>
Date: Fri, 13 Oct 2023 22:01:13 -0400
Subject: [PATCH] fix(ui): don't show pagination warning on first page if all
are displayed (#11979)
---
ui/src/app/shared/components/pagination-panel.tsx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ui/src/app/shared/components/pagination-panel.tsx b/ui/src/app/shared/components/pagination-panel.tsx
index 0f101f42f426..8c21a92cf21d 100644
--- a/ui/src/app/shared/components/pagination-panel.tsx
+++ b/ui/src/app/shared/components/pagination-panel.tsx
@@ -19,7 +19,8 @@ export function PaginationPanel(props: {pagination: Pagination; onChange: (pagin
}>
Next page
- {props.pagination.limit > 0 ? (
+ {/* if pagination is used, and we're either not on the first page, or are on the first page and have more records than the page limit */}
+ {props.pagination.limit > 0 && (props.pagination.offset || (!props.pagination.offset && props.numRecords >= props.pagination.limit)) ? (
<>
Workflows cannot be globally sorted when paginated
>