form view

This commit is contained in:
Jan Prochazka
2021-03-21 17:55:25 +01:00
parent 965a967450
commit 34f2fb2a0a
13 changed files with 329 additions and 10 deletions

View File

@@ -29,3 +29,32 @@ export default function openReferenceForm(rowData, column, conid, database) {
}
);
}
export function openPrimaryKeyForm(rowData, baseTable, conid, database) {
const formViewKey = _.fromPairs(
baseTable.primaryKey.columns.map(({ columnName }) => [columnName, rowData[columnName]])
);
openNewTab(
{
title: baseTable.pureName,
icon: 'img table',
tabComponent: 'TableDataTab',
props: {
schemaName: baseTable.schemaName,
pureName: baseTable.pureName,
conid,
database,
objectTypeField: 'tables',
},
},
{
grid: {
isFormView: true,
formViewKey,
},
},
{
forceNewTab: true,
}
);
}