mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-28 19:56:00 +00:00
nested incomplete loading fix
This commit is contained in:
@@ -95,7 +95,12 @@ export class PerspectiveDisplay {
|
|||||||
// this.mergeRows(collectedRows);
|
// this.mergeRows(collectedRows);
|
||||||
this.mergeRows(collectedRows);
|
this.mergeRows(collectedRows);
|
||||||
// dbg('merged rows', this.rows);
|
// dbg('merged rows', this.rows);
|
||||||
// console.log('MERGED', this.rows);
|
// console.log(
|
||||||
|
// 'MERGED',
|
||||||
|
// this.rows.map(r =>
|
||||||
|
// r.incompleteRowsIndicator ? `************************************ ${r.incompleteRowsIndicator.join('|')}` : r.rowData.join('|')
|
||||||
|
// )
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
fillColumns(children: PerspectiveTreeNode[], parentNodes: PerspectiveTreeNode[]) {
|
fillColumns(children: PerspectiveTreeNode[], parentNodes: PerspectiveTreeNode[]) {
|
||||||
|
|||||||
@@ -34,23 +34,30 @@
|
|||||||
...loadProps,
|
...loadProps,
|
||||||
topCount: counts[node.uniqueName] || 100,
|
topCount: counts[node.uniqueName] || 100,
|
||||||
});
|
});
|
||||||
if (incomplete) {
|
|
||||||
rows = [
|
|
||||||
...rows,
|
|
||||||
{
|
|
||||||
incompleteRowsIndicator: [node.uniqueName],
|
|
||||||
},
|
|
||||||
];
|
|
||||||
}
|
|
||||||
// console.log('ROWS', rows, node.isRoot);
|
// console.log('ROWS', rows, node.isRoot);
|
||||||
|
|
||||||
if (node.isRoot) {
|
if (node.isRoot) {
|
||||||
parentRows.push(...rows);
|
parentRows.push(...rows);
|
||||||
// console.log('PUSH PARENTROWS', parentRows);
|
// console.log('PUSH PARENTROWS', parentRows);
|
||||||
|
|
||||||
|
if (incomplete) {
|
||||||
|
parentRows.push({
|
||||||
|
incompleteRowsIndicator: [node.uniqueName],
|
||||||
|
});
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
|
let lastRowWithChildren = null;
|
||||||
for (const parentRow of parentRows) {
|
for (const parentRow of parentRows) {
|
||||||
const childRows = rows.filter(row => node.matchChildRow(parentRow, row));
|
const childRows = rows.filter(row => node.matchChildRow(parentRow, row));
|
||||||
parentRow[node.fieldName] = childRows;
|
parentRow[node.fieldName] = childRows;
|
||||||
|
if (childRows.length > 0) {
|
||||||
|
lastRowWithChildren = parentRow;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (incomplete && lastRowWithChildren) {
|
||||||
|
lastRowWithChildren[node.fieldName].push({
|
||||||
|
incompleteRowsIndicator: [node.uniqueName],
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user