fixed bug where primarykey wasnt being used properly

This commit is contained in:
Tim Chamberlain
2023-03-03 16:52:13 -06:00
parent caea70252a
commit 142bb76522

View File

@ -549,9 +549,9 @@ function RecordQuery({table, launchProcess}: Props): JSX.Element
selectionModel.forEach((value: GridRowId, index: number) =>
{
let valueToPush = value as string;
if(table.primaryKeyField !== "id")
if(tableMetaData.primaryKeyField !== "id")
{
valueToPush = latestQueryResults[index].values.get("number")
valueToPush = latestQueryResults[index].values.get(tableMetaData.primaryKeyField);
}
newSelectedIds.push(valueToPush as string);
});