Skip to content

Commit c782bdd

Browse files
mohas22mohas22
authored andcommitted
Added catch block with console log
1 parent c234165 commit c782bdd

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

packages/react-sdk-components/src/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -258,11 +258,16 @@ export default function SimpleTableManual(props: PropsWithChildren<SimpleTableMa
258258
function generateRowsData() {
259259
// if referenceList is empty and dataPageName property value exists then make a datapage fetch call and get the list of data.
260260
if (!referenceList.length && dataPageName) {
261-
getDataPage(dataPageName, parameters, context).then(listData => {
262-
const data = formatRowsData(listData);
263-
myRows = data;
264-
setRowData(data);
265-
});
261+
getDataPage(dataPageName, parameters, context)
262+
.then(listData => {
263+
const data = formatRowsData(listData);
264+
myRows = data;
265+
setRowData(data);
266+
})
267+
.catch(e => {
268+
// eslint-disable-next-line no-console
269+
console.log(e);
270+
});
266271
} else {
267272
// The referenceList prop has the JSON data for each row to be displayed
268273
// in the table. So, iterate over referenceList to create the dataRows that

0 commit comments

Comments
 (0)