nested incomplete loading fix

This commit is contained in:
Jan Prochazka
2022-07-24 15:16:02 +02:00
parent d48c34a4a5
commit 5395d1343b
2 changed files with 21 additions and 9 deletions

View File

@@ -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],
});
}
}