mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 23:35:59 +00:00
nested incomplete loading fix
This commit is contained in:
@@ -34,23 +34,30 @@
|
||||
...loadProps,
|
||||
topCount: counts[node.uniqueName] || 100,
|
||||
});
|
||||
if (incomplete) {
|
||||
rows = [
|
||||
...rows,
|
||||
{
|
||||
incompleteRowsIndicator: [node.uniqueName],
|
||||
},
|
||||
];
|
||||
}
|
||||
// console.log('ROWS', rows, node.isRoot);
|
||||
|
||||
if (node.isRoot) {
|
||||
parentRows.push(...rows);
|
||||
// console.log('PUSH PARENTROWS', parentRows);
|
||||
|
||||
if (incomplete) {
|
||||
parentRows.push({
|
||||
incompleteRowsIndicator: [node.uniqueName],
|
||||
});
|
||||
}
|
||||
} else {
|
||||
let lastRowWithChildren = null;
|
||||
for (const parentRow of parentRows) {
|
||||
const childRows = rows.filter(row => node.matchChildRow(parentRow, row));
|
||||
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