perspectives WIP

This commit is contained in:
Jan Prochazka
2022-06-23 14:24:06 +02:00
parent 7ca8880c3c
commit 2fcc4b1ff0
2 changed files with 8 additions and 1 deletions

View File

@@ -49,6 +49,9 @@ export abstract class PerspectiveTreeNode {
abstract get isExpandable();
abstract get childNodes(): PerspectiveTreeNode[];
abstract get icon(): string;
get fieldName() {
return this.codeName;
}
abstract getNodeLoadProps(parentRows: any[]): PerspectiveDataLoadProps;
get isRoot() {
return this.parentNode == null;
@@ -138,6 +141,10 @@ export class PerspectiveTableColumnNode extends PerspectiveTreeNode {
return this.column.columnName;
}
get fieldName() {
return this.codeName + 'Ref';
}
get title() {
return this.column.columnName;
}

View File

@@ -26,7 +26,7 @@
} else {
for (const parentRow of parentRows) {
const childRows = rows.filter(row => node.matchChildRow(parentRow, row));
parentRow[node.codeName] = childRows;
parentRow[node.fieldName] = childRows;
}
}