perspectives: render simple table

This commit is contained in:
Jan Prochazka
2022-06-23 16:04:05 +02:00
parent 4672540f82
commit aca92f3889
5 changed files with 75 additions and 7 deletions

View File

@@ -0,0 +1,18 @@
import { PerspectiveTableNode, PerspectiveTreeNode } from './PerspectiveTreeNode';
export class PerspectiveDisplayColumn {
constructor(public label: string, public field: string) {}
}
export class PerspectiveDisplay {
columns: PerspectiveDisplayColumn[] = [];
constructor(public root: PerspectiveTreeNode, public rows: any[]) {
const children = root.childNodes;
for (const child of children) {
if (child.isChecked) {
this.columns.push(new PerspectiveDisplayColumn(child.title, child.codeName));
}
}
}
}