filter list in perspective

This commit is contained in:
Jan Prochazka
2022-08-04 08:16:22 +02:00
parent 7dcbe6c7c1
commit 9051ba2ee1
5 changed files with 83 additions and 0 deletions

View File

@@ -17,8 +17,14 @@ export interface PerspectiveCustomJoinConfig {
refColumnName: string;
}[];
}
export interface PerspectiveFilterColumnInfo {
columnName: string;
filterType: string;
}
export interface PerspectiveConfig extends PerspectiveConfigColumns {
filters: { [uniqueName: string]: string };
filterInfos: { [uniqueName: string]: PerspectiveFilterColumnInfo };
sort: {
[parentUniqueName: string]: {
uniqueName: string;
@@ -35,6 +41,7 @@ export function createPerspectiveConfig(): PerspectiveConfig {
uncheckedColumns: [],
customJoins: [],
filters: {},
filterInfos: {},
sort: {},
};
}

View File

@@ -160,6 +160,13 @@ export abstract class PerspectiveTreeNode {
...cfg.filters,
[this.uniqueName]: value,
},
filterInfos: {
...cfg.filterInfos,
[this.uniqueName]: {
columnName: this.columnName,
filterType: this.filterType,
},
},
}),
true
);