From 4b2e47f8f906faeed5ce9bdea03b0d8622dfd1e4 Mon Sep 17 00:00:00 2001 From: Aleksandr Gumroian Date: Wed, 4 Dec 2024 14:02:52 +0100 Subject: [PATCH] Refactor pagination condition in RichTable component --- src/common/RichTable/RichTable.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/RichTable/RichTable.js b/src/common/RichTable/RichTable.js index 98e42eb..9eac79f 100644 --- a/src/common/RichTable/RichTable.js +++ b/src/common/RichTable/RichTable.js @@ -64,13 +64,15 @@ function RichTable({ }, }); + const paginationIsNeeded = tableData.length > pageSize && withPagination; + return (
- {withPagination && ( + {paginationIsNeeded && (