mirror of
https://github.com/Kingsrook/qqq-frontend-material-dashboard.git
synced 2025-07-18 05:10:45 +00:00
make sure rows exist in table data before iterating over them
This commit is contained in:
@ -110,6 +110,8 @@ function DataTable({
|
|||||||
}
|
}
|
||||||
|
|
||||||
let showExpandColumn = false;
|
let showExpandColumn = false;
|
||||||
|
if(table.rows)
|
||||||
|
{
|
||||||
for (let i = 0; i < table.rows.length; i++)
|
for (let i = 0; i < table.rows.length; i++)
|
||||||
{
|
{
|
||||||
if (table.rows[i].subRows)
|
if (table.rows[i].subRows)
|
||||||
@ -118,6 +120,7 @@ function DataTable({
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const columnsToMemo = [...table.columns];
|
const columnsToMemo = [...table.columns];
|
||||||
if(showExpandColumn)
|
if(showExpandColumn)
|
||||||
|
Reference in New Issue
Block a user