Skip to content

Commit

Permalink
Added catch block with console log
Browse files Browse the repository at this point in the history
  • Loading branch information
mohas22 authored and samhere06 committed Nov 11, 2024
1 parent 0265777 commit 2e05038
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,16 @@ export default function SimpleTableManual(props: PropsWithChildren<SimpleTableMa
function generateRowsData() {
// if referenceList is empty and dataPageName property value exists then make a datapage fetch call and get the list of data.
if (!referenceList.length && dataPageName) {
getDataPage(dataPageName, parameters, context).then(listData => {
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
Expand Down

0 comments on commit 2e05038

Please sign in to comment.