From 5d6986a92118784a8f43a50c8c23697f36f23c3f Mon Sep 17 00:00:00 2001 From: Uladzislau_Kutarkin Date: Wed, 8 Nov 2023 12:28:14 +0400 Subject: [PATCH] UIBULKED-372: Bulk edit - Element IDs are not unique. --- CHANGELOG.md | 1 + .../BulkEditInAppPreviewModal/BulkEditInAppPreviewModal.js | 2 ++ .../BulkEditList/BulkEditListResult/Preview/Preview.js | 1 + .../Preview/PreviewAccordion/PreviewAccordion.js | 4 +++- .../Preview/PreviewAccordion/PreviewAccordion.test.js | 1 + 5 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 667ab7a2..0cd309f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ * [UIBULKED-331](https://issues.folio.org/browse/UIBULKED-331) Bulk edit actions for holdings notes - add and remove notes. * [UIBULKED-332](https://issues.folio.org/browse/UIBULKED-332) Bulk edit actions for holdings notes - find and replace or remove. * [UIBULKED-333](https://issues.folio.org/browse/UIBULKED-333) Bulk edit actions for holdings notes - change note type. +* [UIBULKED-372](https://issues.folio.org/browse/UIBULKED-372) Bulk edit - Element IDs are not unique. ## [4.0.0](https://github.com/folio-org/ui-bulk-edit/tree/v4.0.0) (2023-10-12) diff --git a/src/components/BulkEditList/BulkEditListResult/BulkEditInAppPreviewModal/BulkEditInAppPreviewModal.js b/src/components/BulkEditList/BulkEditListResult/BulkEditInAppPreviewModal/BulkEditInAppPreviewModal.js index 40905310..d83b1fcc 100644 --- a/src/components/BulkEditList/BulkEditListResult/BulkEditInAppPreviewModal/BulkEditInAppPreviewModal.js +++ b/src/components/BulkEditList/BulkEditListResult/BulkEditInAppPreviewModal/BulkEditInAppPreviewModal.js @@ -44,6 +44,7 @@ const BulkEditInAppPreviewModal = ({ const history = useHistory(); const search = new URLSearchParams(history.location.search); const capabilities = search.get('capabilities'); + const step = search.get('step'); const { visibleColumns } = useContext(RootContext); const swwCallout = () => ( @@ -176,6 +177,7 @@ const BulkEditInAppPreviewModal = ({ columnMapping={columnMapping} visibleColumns={visibleColumnKeys} maxHeight={300} + columnIdPrefix={step} /> ) : } diff --git a/src/components/BulkEditList/BulkEditListResult/Preview/Preview.js b/src/components/BulkEditList/BulkEditListResult/Preview/Preview.js index 012d6d99..6f0d0a33 100644 --- a/src/components/BulkEditList/BulkEditListResult/Preview/Preview.js +++ b/src/components/BulkEditList/BulkEditListResult/Preview/Preview.js @@ -72,6 +72,7 @@ export const Preview = ({ id, title, isInitial, bulkDetails }) => { contentData={contentData} columnMapping={columnMapping} visibleColumns={visibleColumns} + step={step} /> )} {Boolean(errors?.length) && ( diff --git a/src/components/BulkEditList/BulkEditListResult/Preview/PreviewAccordion/PreviewAccordion.js b/src/components/BulkEditList/BulkEditListResult/Preview/PreviewAccordion/PreviewAccordion.js index 322cf09f..cb9dc692 100644 --- a/src/components/BulkEditList/BulkEditListResult/Preview/PreviewAccordion/PreviewAccordion.js +++ b/src/components/BulkEditList/BulkEditListResult/Preview/PreviewAccordion/PreviewAccordion.js @@ -9,7 +9,7 @@ import { } from '@folio/stripes/components'; -const PreviewAccordion = ({ contentData, columnMapping, visibleColumns, isInitial }) => { +const PreviewAccordion = ({ contentData, columnMapping, visibleColumns, isInitial, step }) => { const translationKey = isInitial ? 'title' : 'titleChanged'; const maxHeight = window.innerHeight * 0.4; @@ -31,6 +31,7 @@ const PreviewAccordion = ({ contentData, columnMapping, visibleColumns, isInitia columnMapping={columnMapping} visibleColumns={visibleColumnKeys} maxHeight={maxHeight} + columnIdPrefix={step} /> @@ -43,6 +44,7 @@ PreviewAccordion.propTypes = { columnMapping: PropTypes.object, visibleColumns: PropTypes.arrayOf(PropTypes.object), isInitial: PropTypes.bool, + step: PropTypes.string, }; export default memo(PreviewAccordion); diff --git a/src/components/BulkEditList/BulkEditListResult/Preview/PreviewAccordion/PreviewAccordion.test.js b/src/components/BulkEditList/BulkEditListResult/Preview/PreviewAccordion/PreviewAccordion.test.js index 3d24114c..b0403f81 100644 --- a/src/components/BulkEditList/BulkEditListResult/Preview/PreviewAccordion/PreviewAccordion.test.js +++ b/src/components/BulkEditList/BulkEditListResult/Preview/PreviewAccordion/PreviewAccordion.test.js @@ -77,6 +77,7 @@ const renderPreviewAccordion = ({ visibleColumns={visibleColumns} columnMapping={columnMapping} initial={initial} + step="UPLOAD" /> , );