mirror of
https://github.com/Kingsrook/qqq-frontend-material-dashboard.git
synced 2025-07-19 05:40:44 +00:00
Don't crash app home if count comes back null; don't crash table if no field named 'id'
This commit is contained in:
@ -592,9 +592,26 @@ function EntityList({table, launchProcess}: Props): JSX.Element
|
||||
row[field.name] = value;
|
||||
});
|
||||
|
||||
if(!row["id"])
|
||||
{
|
||||
row["id"] = row[tableMetaData.primaryKeyField];
|
||||
}
|
||||
|
||||
rows.push(row);
|
||||
});
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// do this secondary check for columnsToRender - in case we didn't have any rows above, and our check for string isn't enough. //
|
||||
// ... shouldn't this be just based on the field definition anyway... ? plus adornments? //
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
fields.forEach((field) =>
|
||||
{
|
||||
if(field.possibleValueSourceName)
|
||||
{
|
||||
columnsToRender[field.name] = true;
|
||||
}
|
||||
});
|
||||
|
||||
if(columnsModel.length == 0)
|
||||
{
|
||||
setupGridColumns(columnsToRender);
|
||||
@ -877,21 +894,6 @@ function EntityList({table, launchProcess}: Props): JSX.Element
|
||||
return "";
|
||||
}
|
||||
|
||||
function getRecordIdsForProcess(): string | QQueryFilter
|
||||
{
|
||||
if (selectFullFilterState === "filter")
|
||||
{
|
||||
return (buildQFilter(filterModel));
|
||||
}
|
||||
|
||||
if (selectedIds.length > 0)
|
||||
{
|
||||
return (selectedIds.join(","));
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
const openModalProcess = (process: QProcessMetaData = null) =>
|
||||
{
|
||||
if (selectFullFilterState === "filter")
|
||||
|
Reference in New Issue
Block a user