mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 11:56:00 +00:00
fixes
This commit is contained in:
@@ -79,8 +79,12 @@
|
||||
const lastVisibleRowIndexRef = createRef(0);
|
||||
const disableLoadNextRef = createRef(false);
|
||||
|
||||
// Essential function !!
|
||||
// Fills nested data into parentRows (assigns into array parentRows[i][node.fieldName])
|
||||
// eg. when node is CustomJoinTreeNode, loads data from data provider
|
||||
async function loadLevelData(node: PerspectiveTreeNode, parentRows: any[], counts) {
|
||||
/// console.log('loadLevelData', node, parentRows, counts);
|
||||
// console.log('loadLevelData', node.codeName, node.fieldName, parentRows);
|
||||
// console.log('COUNTS', node.codeName, counts);
|
||||
dbg('load level data', counts);
|
||||
// const loadProps: PerspectiveDataLoadPropsWithNode[] = [];
|
||||
const loadChildNodes = [];
|
||||
@@ -115,6 +119,9 @@
|
||||
incompleteRowsIndicator: [node.designerId],
|
||||
});
|
||||
}
|
||||
} else {
|
||||
// this is needed for nested call
|
||||
rows = _.compact(_.flatten(parentRows.map(x => x[node.fieldName])));
|
||||
}
|
||||
|
||||
// console.log('TESTING NODE', node);
|
||||
@@ -127,14 +134,21 @@
|
||||
// if (child.preloadedLevelData) console.log('LOADING CHILD DATA', rows);
|
||||
// console.log(child.preloadedLevelData, child);
|
||||
// console.log('LOADING FOR CHILD', child.codeName, child.columnName, child);
|
||||
// console.log('ROWS', child.preloadedLevelData ? parentRows : rows);
|
||||
// console.log('CALL CHILD', child.codeName, rows, parentRows);
|
||||
await loadLevelData(
|
||||
child,
|
||||
child.preloadedLevelData
|
||||
? _.compact(_.flatten(parentRows.map(x => x[child.columnName])))
|
||||
: node.preloadedLevelData
|
||||
? parentRows
|
||||
: rows,
|
||||
rows,
|
||||
// node.preloadedLevelData
|
||||
// ? _.compact(_.flatten(parentRows.map(x => x[child.columnName])))
|
||||
// : child.preloadedLevelData
|
||||
// ? parentRows
|
||||
// : rows,
|
||||
// child.preloadedLevelData
|
||||
// ? _.compact(_.flatten(parentRows.map(x => x[child.columnName])))
|
||||
// : node.preloadedLevelData
|
||||
// ? parentRows
|
||||
// : rows,
|
||||
|
||||
counts
|
||||
);
|
||||
// loadProps.push(child.getNodeLoadProps());
|
||||
|
||||
Reference in New Issue
Block a user