export preserves column settings

This commit is contained in:
Jan Prochazka
2022-03-13 14:33:21 +01:00
parent 34dae68a62
commit 84725f0586
6 changed files with 32 additions and 4 deletions

View File

@@ -570,6 +570,20 @@ export abstract class GridDisplay {
return sql;
}
getExportColumnMap() {
const changesDefined = this.config.hiddenColumns?.length > 0 || this.config.addedColumns?.length > 0;
if (this.isDynamicStructure && !changesDefined) {
return null;
}
return this.getColumns(null)
.filter(col => col.isChecked)
.map(col => ({
dst: col.headerText,
src: col.uniqueName,
ignore: !changesDefined,
}));
}
resizeColumn(uniqueName: string, computedSize: number, diff: number) {
this.setConfig(cfg => {
const columnWidths = {