From 0f9e817582d1ea2585d05e5e8ce39432a8e2e7a4 Mon Sep 17 00:00:00 2001 From: samhere06 <118881732+samhere06@users.noreply.github.com> Date: Tue, 12 Nov 2024 11:26:04 +0530 Subject: [PATCH] Added catch block with console log (#414) Co-authored-by: mohas22 Co-authored-by: tumms2021389 <97188066+tumms2021389@users.noreply.github.com> --- .../SimpleTableManual/SimpleTableManual.tsx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/react-sdk-components/src/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx b/packages/react-sdk-components/src/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx index a9cde864..03c20257 100644 --- a/packages/react-sdk-components/src/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx +++ b/packages/react-sdk-components/src/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx @@ -258,11 +258,16 @@ export default function SimpleTableManual(props: PropsWithChildren { - const data = formatRowsData(listData); - myRows = data; - setRowData(data); - }); + getDataPage(dataPageName, parameters, context) + .then(listData => { + const data = formatRowsData(listData); + myRows = data; + setRowData(data); + }) + .catch(e => { + // eslint-disable-next-line no-console + console.log(e); + }); } else { // The referenceList prop has the JSON data for each row to be displayed // in the table. So, iterate over referenceList to create the dataRows that