From 66f83b24bdf88169f7e470231f5eb14627156a9c Mon Sep 17 00:00:00 2001 From: Aleksandr Gumroian Date: Wed, 4 Dec 2024 14:02:35 +0100 Subject: [PATCH 1/2] Add optional close button to ModalHeader component --- src/bootstrap/Modal.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/bootstrap/Modal.js b/src/bootstrap/Modal.js index a1e65c0..efdf6a8 100644 --- a/src/bootstrap/Modal.js +++ b/src/bootstrap/Modal.js @@ -88,18 +88,21 @@ export function Modal({ shown, setShown, scrollable, size, children }) { ModalHeader.propTypes = { setShown: PropTypes.func.isRequired, title: PropTypes.string.isRequired, + showCloseButton: PropTypes.bool, }; -export function ModalHeader({ setShown, title }) { +export function ModalHeader({ setShown, title, showCloseButton = true }) { return (

{title}

-
); } From 4b2e47f8f906faeed5ce9bdea03b0d8622dfd1e4 Mon Sep 17 00:00:00 2001 From: Aleksandr Gumroian Date: Wed, 4 Dec 2024 14:02:52 +0100 Subject: [PATCH 2/2] 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 && (