parentFilter - declarative support

This commit is contained in:
Jan Prochazka
2022-08-07 18:12:10 +02:00
parent 5418bb932c
commit 1731b7e4a3
6 changed files with 61 additions and 1 deletions

View File

@@ -247,6 +247,18 @@ export abstract class PerspectiveTreeNode {
if (uniquePath[0] != this.codeName) return null;
return this.findChildNodeByUniquePath(uniquePath.slice(1));
}
get supportsParentFilter() {
return (
(this.parentNode?.isRoot || this.parentNode?.supportsParentFilter) &&
this.parentNode?.databaseConfig?.conid == this.databaseConfig?.conid &&
this.parentNode?.databaseConfig?.database == this.databaseConfig?.database
);
}
get isParentFilter() {
return !!(this.config.parentFilters || []).find(x => x.uniqueName == this.uniqueName);
}
}
export class PerspectiveTableColumnNode extends PerspectiveTreeNode {