From f7fa84ac03ebe9e1382b795a98b81d83229fddb8 Mon Sep 17 00:00:00 2001 From: chestofwonders Date: Tue, 5 Mar 2024 16:57:57 +0100 Subject: [PATCH] LPD-15145 Clear mapping of DSM fields in cards visualization mode --- .../visualization_modes/cards/Cards.tsx | 21 ++----------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/modules/apps/frontend-data-set/frontend-data-set-views-web/src/main/resources/META-INF/resources/js/fds_view/visualization_modes/cards/Cards.tsx b/modules/apps/frontend-data-set/frontend-data-set-views-web/src/main/resources/META-INF/resources/js/fds_view/visualization_modes/cards/Cards.tsx index 7d89b1edff0b83..2345e3b54cc100 100644 --- a/modules/apps/frontend-data-set/frontend-data-set-views-web/src/main/resources/META-INF/resources/js/fds_view/visualization_modes/cards/Cards.tsx +++ b/modules/apps/frontend-data-set/frontend-data-set-views-web/src/main/resources/META-INF/resources/js/fds_view/visualization_modes/cards/Cards.tsx @@ -73,7 +73,7 @@ export default function Cards(props: IFDSViewSectionProps) { ); if (!fdsCardsSection) { - return cardsSection; + return {label: cardsSection.label, name: cardsSection.name}; } return { @@ -161,26 +161,9 @@ export default function Cards(props: IFDSViewSectionProps) { return; } - const fdsCardsSection: IFDSCardsSection = await response.json(); - closeModal(); - setCardsSections( - cardsSections.map((cardsSection) => { - if (cardsSection.name !== fdsCardsSection.name) { - return cardsSection; - } - - return { - ...cardsSection, - externalReferenceCode: - fdsCardsSection.externalReferenceCode, - field: { - name: fdsCardsSection.fieldName, - }, - }; - }) - ); + getFDSCardsSections(); openDefaultSuccessToast(); };