mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 21:55:59 +00:00
29 lines
646 B
TypeScript
29 lines
646 B
TypeScript
export interface PerspectiveConfigColumns {
|
|
expandedColumns: string[];
|
|
checkedColumns: string[];
|
|
uncheckedColumns: string[];
|
|
}
|
|
|
|
export interface PerspectiveConfig extends PerspectiveConfigColumns {
|
|
filters: { [uniqueName: string]: string };
|
|
sort: {
|
|
uniqueName: string;
|
|
order: 'ASC' | 'DESC';
|
|
}[];
|
|
}
|
|
|
|
export function createPerspectiveConfig(): PerspectiveConfig {
|
|
return {
|
|
expandedColumns: [],
|
|
checkedColumns: [],
|
|
uncheckedColumns: [],
|
|
filters: {},
|
|
sort: [],
|
|
};
|
|
}
|
|
|
|
export type ChangePerspectiveConfigFunc = (
|
|
changeFunc: (config: PerspectiveConfig) => PerspectiveConfig,
|
|
reload?: boolean
|
|
) => void;
|