mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-24 02:36:00 +00:00
perspectives WIP
This commit is contained in:
@@ -49,6 +49,9 @@ export abstract class PerspectiveTreeNode {
|
|||||||
abstract get isExpandable();
|
abstract get isExpandable();
|
||||||
abstract get childNodes(): PerspectiveTreeNode[];
|
abstract get childNodes(): PerspectiveTreeNode[];
|
||||||
abstract get icon(): string;
|
abstract get icon(): string;
|
||||||
|
get fieldName() {
|
||||||
|
return this.codeName;
|
||||||
|
}
|
||||||
abstract getNodeLoadProps(parentRows: any[]): PerspectiveDataLoadProps;
|
abstract getNodeLoadProps(parentRows: any[]): PerspectiveDataLoadProps;
|
||||||
get isRoot() {
|
get isRoot() {
|
||||||
return this.parentNode == null;
|
return this.parentNode == null;
|
||||||
@@ -138,6 +141,10 @@ export class PerspectiveTableColumnNode extends PerspectiveTreeNode {
|
|||||||
return this.column.columnName;
|
return this.column.columnName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get fieldName() {
|
||||||
|
return this.codeName + 'Ref';
|
||||||
|
}
|
||||||
|
|
||||||
get title() {
|
get title() {
|
||||||
return this.column.columnName;
|
return this.column.columnName;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
} else {
|
} else {
|
||||||
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.codeName] = childRows;
|
parentRow[node.fieldName] = childRows;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user