mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 21:55:59 +00:00
add column to JSON view
This commit is contained in:
@@ -70,9 +70,14 @@ function getDisplayColumn(basePath, columnName, display) {
|
||||
|
||||
export function analyseCollectionDisplayColumns(rows, display) {
|
||||
const res = [];
|
||||
const addedColumns = display?.config?.addedColumns;
|
||||
for (const row of rows || []) {
|
||||
getColumnsForObject([], row, res, display);
|
||||
}
|
||||
for (const added of addedColumns || []) {
|
||||
if (res.find(x => x.uniqueName == added)) continue;
|
||||
res.push(getDisplayColumn([], added, display));
|
||||
}
|
||||
return (
|
||||
res.map(col => ({
|
||||
...col,
|
||||
|
||||
Reference in New Issue
Block a user