mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-21 03:36:01 +00:00
form view
This commit is contained in:
@@ -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,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user