@adaptabletools/adaptable 20.1.1 → 20.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/Utilities/Services/DataService.js +1 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +2 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.js +2 -2
- package/src/View/CellSummary/CellSummaryDetails.js +2 -2
- package/src/View/CellSummary/CellSummaryViewPanel.js +2 -2
- package/src/View/ColumnInfo/ColumnInfo.js +2 -2
- package/src/View/Comments/CommentsPopup.js +2 -2
- package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +3 -0
- package/src/View/Components/ColumnFilter/components/FloatingFilterValues.js +7 -1
- package/src/View/Components/Forms/AdaptableFormControlTextClear.js +1 -1
- package/src/View/Components/PreviewResultsPanel.js +2 -2
- package/src/View/Components/Selectors/BulkUpdateValueSelector.js +2 -2
- package/src/View/Components/Selectors/PermittedValuesSelector.js +1 -1
- package/src/View/Components/WizardSummaryPage.js +2 -2
- package/src/View/Dashboard/CustomDashboardButton.js +1 -1
- package/src/View/Dashboard/Dashboard.js +2 -2
- package/src/View/Dashboard/DashboardToolbarFactory.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryViewPanel.js +8 -9
- package/src/View/DataImport/DataImportWizard/sections/ColumnsSection.js +2 -2
- package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +2 -2
- package/src/View/DataSet/DataSetViewPanel.js +1 -1
- package/src/View/Export/ReportFormatSelector.js +1 -1
- package/src/View/Export/ReportNameSelector.js +1 -1
- package/src/View/Filter/FilterViewPanel.js +2 -2
- package/src/View/GridFilter/GridFilterViewPanel.js +1 -1
- package/src/View/Layout/LayoutViewPanel.js +1 -1
- package/src/View/Layout/PivotDetailsPopoup.js +2 -2
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +2 -2
- package/src/View/Note/NotePopup.js +2 -2
- package/src/View/SmartEdit/SmartEditViewPanel.js +1 -1
- package/src/View/StateManagement/components/LoadButton.js +1 -1
- package/src/View/Theme/ThemeSelector.js +1 -1
- package/src/agGrid/AdaptableAgGrid.d.ts +10 -0
- package/src/agGrid/AdaptableAgGrid.js +38 -15
- package/src/components/Dashboard/DashboardToolbar.js +2 -2
- package/src/components/Icon/index.js +1 -1
- package/src/components/InfiniteTable/index.d.ts +2 -2
- package/src/components/InfiniteTable/index.js +2 -2
- package/src/components/List/GridList/index.js +2 -2
- package/src/components/Select/Select.d.ts +1 -0
- package/src/components/Select/Select.js +1 -1
- package/src/components/SimpleButton/index.js +5 -1
- package/src/env.js +2 -2
- package/src/layout-manager/src/index.js +32 -3
- package/tsconfig.esm.tsbuildinfo +1 -1
|
@@ -1954,6 +1954,28 @@ You need to define at least one Layout!`);
|
|
|
1954
1954
|
});
|
|
1955
1955
|
return data;
|
|
1956
1956
|
}
|
|
1957
|
+
/**
|
|
1958
|
+
* This method internally differentiates between server-side and client-side row model
|
|
1959
|
+
* and correctly calls the appropriate method as per the current row model type
|
|
1960
|
+
*/
|
|
1961
|
+
applyAgGridTransaction(transaction) {
|
|
1962
|
+
const isServerSideRowModel = this.getAgGridRowModelType() === 'serverSide';
|
|
1963
|
+
const agGridApi = this.agGridAdapter.getAgGridApi();
|
|
1964
|
+
return isServerSideRowModel
|
|
1965
|
+
? agGridApi.applyServerSideTransaction(transaction)
|
|
1966
|
+
: agGridApi.applyTransaction(transaction);
|
|
1967
|
+
}
|
|
1968
|
+
/**
|
|
1969
|
+
* This method internally differentiates between server-side and client-side row model
|
|
1970
|
+
* and correctly calls the appropriate method as per the current row model type
|
|
1971
|
+
*/
|
|
1972
|
+
applyAgGridTransactionAsync(transaction, callback) {
|
|
1973
|
+
const isServerSideRowModel = this.getAgGridRowModelType() === 'serverSide';
|
|
1974
|
+
const agGridApi = this.agGridAdapter.getAgGridApi();
|
|
1975
|
+
return isServerSideRowModel
|
|
1976
|
+
? agGridApi.applyServerSideTransactionAsync(transaction, callback)
|
|
1977
|
+
: agGridApi.applyTransactionAsync(transaction, callback);
|
|
1978
|
+
}
|
|
1957
1979
|
updateRows(dataRows, dataUpdateConfig) {
|
|
1958
1980
|
if (this.hasAutogeneratedPrimaryKey) {
|
|
1959
1981
|
this.addSyntheticPrimaryKeyIfMissing(dataRows);
|
|
@@ -1961,9 +1983,7 @@ You need to define at least one Layout!`);
|
|
|
1961
1983
|
dataUpdateConfig = dataUpdateConfig || {};
|
|
1962
1984
|
if (dataUpdateConfig.runAsync) {
|
|
1963
1985
|
return new Promise((resolve) => {
|
|
1964
|
-
this.
|
|
1965
|
-
.getAgGridApi()
|
|
1966
|
-
.applyTransactionAsync({ update: dataRows }, (transaction) => {
|
|
1986
|
+
this.applyAgGridTransactionAsync({ update: dataRows }, (transaction) => {
|
|
1967
1987
|
if (typeof dataUpdateConfig.callback === 'function') {
|
|
1968
1988
|
dataUpdateConfig.callback(transaction);
|
|
1969
1989
|
}
|
|
@@ -1975,7 +1995,7 @@ You need to define at least one Layout!`);
|
|
|
1975
1995
|
});
|
|
1976
1996
|
}
|
|
1977
1997
|
else {
|
|
1978
|
-
const transaction = this.
|
|
1998
|
+
const transaction = this.applyAgGridTransaction({
|
|
1979
1999
|
update: dataRows,
|
|
1980
2000
|
});
|
|
1981
2001
|
if (dataUpdateConfig.flushAsync) {
|
|
@@ -1995,7 +2015,7 @@ You need to define at least one Layout!`);
|
|
|
1995
2015
|
}
|
|
1996
2016
|
if (dataUpdateConfig.runAsync) {
|
|
1997
2017
|
return new Promise((resolve) => {
|
|
1998
|
-
this.
|
|
2018
|
+
this.applyAgGridTransactionAsync(newData, (transaction) => {
|
|
1999
2019
|
if (typeof dataUpdateConfig.callback === 'function') {
|
|
2000
2020
|
dataUpdateConfig.callback(transaction);
|
|
2001
2021
|
}
|
|
@@ -2008,7 +2028,7 @@ You need to define at least one Layout!`);
|
|
|
2008
2028
|
});
|
|
2009
2029
|
}
|
|
2010
2030
|
else {
|
|
2011
|
-
const transaction = this.
|
|
2031
|
+
const transaction = this.applyAgGridTransaction(newData);
|
|
2012
2032
|
if (dataUpdateConfig.flushAsync) {
|
|
2013
2033
|
this.agGridAdapter.getAgGridApi().flushAsyncTransactions();
|
|
2014
2034
|
}
|
|
@@ -2035,9 +2055,7 @@ You need to define at least one Layout!`);
|
|
|
2035
2055
|
dataUpdateConfig = dataUpdateConfig || {};
|
|
2036
2056
|
if (dataUpdateConfig.runAsync) {
|
|
2037
2057
|
return new Promise((resolve) => {
|
|
2038
|
-
this.
|
|
2039
|
-
.getAgGridApi()
|
|
2040
|
-
.applyTransactionAsync({ update: updateDataRows, add: addDataRows, addIndex: dataUpdateConfig.addIndex }, (transaction) => {
|
|
2058
|
+
this.applyAgGridTransactionAsync({ update: updateDataRows, add: addDataRows, addIndex: dataUpdateConfig.addIndex }, (transaction) => {
|
|
2041
2059
|
if (typeof dataUpdateConfig.callback === 'function') {
|
|
2042
2060
|
dataUpdateConfig.callback(transaction);
|
|
2043
2061
|
}
|
|
@@ -2055,7 +2073,7 @@ You need to define at least one Layout!`);
|
|
|
2055
2073
|
});
|
|
2056
2074
|
}
|
|
2057
2075
|
else {
|
|
2058
|
-
const transaction = this.
|
|
2076
|
+
const transaction = this.applyAgGridTransaction({
|
|
2059
2077
|
update: updateDataRows,
|
|
2060
2078
|
add: addDataRows,
|
|
2061
2079
|
addIndex: dataUpdateConfig.addIndex,
|
|
@@ -2076,9 +2094,7 @@ You need to define at least one Layout!`);
|
|
|
2076
2094
|
dataUpdateConfig = dataUpdateConfig || {};
|
|
2077
2095
|
if (dataUpdateConfig.runAsync) {
|
|
2078
2096
|
return new Promise((resolve) => {
|
|
2079
|
-
this.
|
|
2080
|
-
.getAgGridApi()
|
|
2081
|
-
.applyTransactionAsync({ remove: dataRows }, (transaction) => {
|
|
2097
|
+
this.applyAgGridTransactionAsync({ remove: dataRows }, (transaction) => {
|
|
2082
2098
|
if (typeof dataUpdateConfig.callback === 'function') {
|
|
2083
2099
|
dataUpdateConfig.callback(transaction);
|
|
2084
2100
|
}
|
|
@@ -2090,7 +2106,7 @@ You need to define at least one Layout!`);
|
|
|
2090
2106
|
});
|
|
2091
2107
|
}
|
|
2092
2108
|
else {
|
|
2093
|
-
const transaction = this.
|
|
2109
|
+
const transaction = this.applyAgGridTransaction({
|
|
2094
2110
|
remove: dataRows,
|
|
2095
2111
|
});
|
|
2096
2112
|
if (dataUpdateConfig.flushAsync) {
|
|
@@ -3172,7 +3188,14 @@ You need to define at least one Layout!`);
|
|
|
3172
3188
|
});
|
|
3173
3189
|
this.refreshCellsBasedOnCellDataChange(rowNode, cellDataChangedInfos);
|
|
3174
3190
|
this.refreshColumnsBasedOnCellDataChange(cellDataChangedInfos);
|
|
3175
|
-
|
|
3191
|
+
const colIds = cellDataChangedInfos.map((c) => c.column.columnId);
|
|
3192
|
+
const { columnFilterApi, gridFilterApi } = this.api.filterApi;
|
|
3193
|
+
const isGridFilterActive = !!gridFilterApi.getCurrentGridFilterExpression();
|
|
3194
|
+
const isColumnFilterActive = colIds.some((colId) => columnFilterApi.isColumnFilterActiveForColumn(colId));
|
|
3195
|
+
const shouldFilter = isGridFilterActive || isColumnFilterActive;
|
|
3196
|
+
if (shouldFilter) {
|
|
3197
|
+
this.filterOnDataChange();
|
|
3198
|
+
}
|
|
3176
3199
|
}
|
|
3177
3200
|
refreshCellsBasedOnCellDataChange(rowNode, cellDataChangedInfos) {
|
|
3178
3201
|
// Check if node is visible as otherwise AG Grid wont refresh
|
|
@@ -7,7 +7,7 @@ export function DashboardToolbar(props) {
|
|
|
7
7
|
React.createElement("div", { className: "ab-Dashboard__toolbar-content" }, props.children),
|
|
8
8
|
React.createElement(Flex, { className: "ab-Dashboard__toolbar-title", flexDirection: "row", alignItems: "center" },
|
|
9
9
|
React.createElement("span", null, props.title),
|
|
10
|
-
props.showConfigure && (React.createElement(SimpleButton, { icon: "spanner", variant: "text", tone: "none", "data-name": "configure", iconSize: 16, marginLeft: 1, tooltip: props.tooltip || `Configure ${props.title}`, onClick: () => props.onConfigure() })),
|
|
10
|
+
props.showConfigure && (React.createElement(SimpleButton, { "aria-label": `Configure ${props.title}`, icon: "spanner", variant: "text", tone: "none", "data-name": "configure", iconSize: 16, marginLeft: 1, tooltip: props.tooltip || `Configure ${props.title}`, onClick: () => props.onConfigure() })),
|
|
11
11
|
' ',
|
|
12
|
-
props.showClose && (React.createElement(SimpleButton, { style: { alignSelf: 'flex-end' }, disabled: props.accessLevel == 'ReadOnly', "data-name": "close", icon: "close", variant: "text", tone: "none", iconSize: 16, marginLeft: 1, tooltip: props.tooltip || `Close ${props.title} Toolbar`, onClick: () => props.onClose() })))));
|
|
12
|
+
props.showClose && (React.createElement(SimpleButton, { "aria-label": `Close ${props.title}`, style: { alignSelf: 'flex-end' }, disabled: props.accessLevel == 'ReadOnly', "data-name": "close", icon: "close", variant: "text", tone: "none", iconSize: 16, marginLeft: 1, tooltip: props.tooltip || `Close ${props.title} Toolbar`, onClick: () => props.onClose() })))));
|
|
13
13
|
}
|
|
@@ -34,7 +34,7 @@ export const IconComponent = (props) => {
|
|
|
34
34
|
};
|
|
35
35
|
}, [icon]);
|
|
36
36
|
if (isAdaptableSystemIcon(icon) && icon.name in allIcons) {
|
|
37
|
-
return (React.createElement(Icon, { name: icon.name, size: icon.size, style: icon.style, className: className }));
|
|
37
|
+
return (React.createElement(Icon, { "aria-hidden": "true", name: icon.name, size: icon.size, style: icon.style, className: className }));
|
|
38
38
|
}
|
|
39
39
|
if (isAdaptableCustomIcon(icon)) {
|
|
40
40
|
let width = icon.style?.width ?? 'var(--ab-cmp-icon__width)';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InfiniteTableProps } from '@infinite-table/infinite-react';
|
|
2
2
|
export * from '@infinite-table/infinite-react';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
declare function
|
|
5
|
-
export {
|
|
4
|
+
declare function InfiniteTableGrid<T = any>(props: InfiniteTableProps<T>): React.JSX.Element;
|
|
5
|
+
export { InfiniteTableGrid };
|
|
@@ -2,8 +2,8 @@ import { InfiniteTable as InfiniteTableComponent, } from '@infinite-table/infini
|
|
|
2
2
|
export * from '@infinite-table/infinite-react';
|
|
3
3
|
import { INFINITE_TABLE_LICENSE_KEY } from '../../EnvVars';
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
function
|
|
5
|
+
function InfiniteTableGrid(props) {
|
|
6
6
|
return (React.createElement(InfiniteTableComponent, { sortable: false, rowHeight: '--ab-grid-row-height', draggableColumns: false, keyboardNavigation: false, ...props, licenseKey: INFINITE_TABLE_LICENSE_KEY }));
|
|
7
7
|
}
|
|
8
8
|
InfiniteTableComponent.licenseKey = INFINITE_TABLE_LICENSE_KEY;
|
|
9
|
-
export {
|
|
9
|
+
export { InfiniteTableGrid };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { DataSource,
|
|
2
|
+
import { DataSource, InfiniteTableGrid, } from '../../../components/InfiniteTable';
|
|
3
3
|
import join from '../../utils/join';
|
|
4
4
|
const baseClassName = 'ab-GridList';
|
|
5
5
|
const columnsMap = {
|
|
@@ -13,7 +13,7 @@ const GridList = (props) => {
|
|
|
13
13
|
};
|
|
14
14
|
}).filter((data) => !!data.item);
|
|
15
15
|
return (React.createElement(DataSource, { data: data, primaryKey: "id" },
|
|
16
|
-
React.createElement(
|
|
16
|
+
React.createElement(InfiniteTableGrid, { header: false, showZebraRows: props.showZebraRows, rowHeight: props.rowHeight ?? '--ab-grid-row-height', domProps: {
|
|
17
17
|
className: join(baseClassName, props.className),
|
|
18
18
|
style: {
|
|
19
19
|
minHeight: '15rem',
|
|
@@ -43,6 +43,7 @@ export type SelectProps<SelectValue extends unknown, IsMulti extends boolean = f
|
|
|
43
43
|
};
|
|
44
44
|
onInputChange?: (value: string) => void;
|
|
45
45
|
onMenuOpen?: VoidFunction;
|
|
46
|
+
'aria-label'?: string;
|
|
46
47
|
size?: 'small' | 'normal';
|
|
47
48
|
isCreatable?: boolean;
|
|
48
49
|
menuPortalTarget?: HTMLElement;
|
|
@@ -365,7 +365,7 @@ export const Select = function (props) {
|
|
|
365
365
|
setInputValue(value);
|
|
366
366
|
props.onInputChange?.(value);
|
|
367
367
|
}, [props.onInputChange, isMulti]);
|
|
368
|
-
return (React.createElement(SelectComponent, { ref: ref, inputValue: inputValue, onInputChange: onInputChange, onFocus: onFocus, onBlur: onBlur, onMenuOpen: props.onMenuOpen, isLoading: props.isLoading, options: props.options, className: join(props.className, 'ab-Select'), isDisabled: disabled, menuPlacement: props.menuPlacement ?? 'auto', isSearchable: props.searchable, hideSelectedOptions: false, isMulti: isMulti, value: selectedOption, blurInputOnSelect: false, menuPosition: props.menuPosition ?? 'absolute',
|
|
368
|
+
return (React.createElement(SelectComponent, { ref: ref, "aria-label": props['aria-label'], inputValue: inputValue, onInputChange: onInputChange, onFocus: onFocus, onBlur: onBlur, onMenuOpen: props.onMenuOpen, isLoading: props.isLoading, options: props.options, className: join(props.className, 'ab-Select'), isDisabled: disabled, menuPlacement: props.menuPlacement ?? 'auto', isSearchable: props.searchable, hideSelectedOptions: false, isMulti: isMulti, value: selectedOption, blurInputOnSelect: false, menuPosition: props.menuPosition ?? 'absolute',
|
|
369
369
|
// This needed so the menu is not clipped by overflow: hidden
|
|
370
370
|
menuPortalTarget: props.menuPortalTarget === undefined ? document.body : null, isClearable: props.isClearable, closeMenuOnSelect: props.closeMenuOnSelect, onChange: (option) => {
|
|
371
371
|
if (isMulti) {
|
|
@@ -81,7 +81,11 @@ const SimpleButton = React.forwardRef((givenProps, theRef) => {
|
|
|
81
81
|
const fontWeight = buttonProps.fontWeight
|
|
82
82
|
? theme[buttonProps.fontWeight] ?? buttonProps.fontWeight ?? 'normal'
|
|
83
83
|
: 'normal';
|
|
84
|
-
const btn = (React.createElement(Button, { ...buttonProps,
|
|
84
|
+
const btn = (React.createElement(Button, { ...buttonProps, "aria-label": buttonProps['aria-label'] ||
|
|
85
|
+
buttonProps.label ||
|
|
86
|
+
tooltip ||
|
|
87
|
+
buttonProps.title ||
|
|
88
|
+
`${buttonProps.key}`, disabled: disabled, className: join(className, baseClassName, disabled ? `${baseClassName}--disabled` : '', fontWeight ? `${baseClassName}--font-weight=${fontWeight}` : '', `${baseClassName}--variant-${variant}`, `${baseClassName}--tone-${tone}`), ref: theRef }, children));
|
|
85
89
|
return tooltip ? React.createElement(Tooltip, { label: tooltip }, btn) : btn;
|
|
86
90
|
});
|
|
87
91
|
export default SimpleButton;
|
package/src/env.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
NEXT_PUBLIC_INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862" || '',
|
|
3
|
-
PUBLISH_TIMESTAMP:
|
|
4
|
-
VERSION: "20.1.
|
|
3
|
+
PUBLISH_TIMESTAMP: 1747298992714 || Date.now(),
|
|
4
|
+
VERSION: "20.1.3" || '--current-version--',
|
|
5
5
|
};
|
|
@@ -242,19 +242,28 @@ export class LayoutManager extends LMEmitter {
|
|
|
242
242
|
: this.getTableLayoutModelFromGrid();
|
|
243
243
|
}
|
|
244
244
|
getPivotLayoutModelFromGrid() {
|
|
245
|
-
const
|
|
245
|
+
const pivotResultColumns = this.gridApi.getPivotResultColumns() || [];
|
|
246
|
+
const pivotResultColumnsSet = new Set(pivotResultColumns.map((col) => col.getColId()));
|
|
246
247
|
const prevLayout = this.currentLayout;
|
|
247
248
|
const columnState = this.gridApi
|
|
248
249
|
.getColumnState()
|
|
249
250
|
.filter((col) => !pivotResultColumnsSet.has(col.colId));
|
|
250
251
|
let PivotColumns = this.gridApi.getPivotColumns().map((col) => col.getColId());
|
|
251
252
|
const layout = this.getUndecidedLayoutModelFromGrid(columnState);
|
|
253
|
+
let ColumnWidths = layout.ColumnWidths || {};
|
|
254
|
+
//let's also include the column widths of the pivotResult columns
|
|
255
|
+
pivotResultColumns.forEach((col) => {
|
|
256
|
+
ColumnWidths[col.getColId()] = col.getActualWidth();
|
|
257
|
+
});
|
|
258
|
+
if (!Object.keys(ColumnWidths).length) {
|
|
259
|
+
ColumnWidths = undefined;
|
|
260
|
+
}
|
|
252
261
|
delete layout.TableColumns;
|
|
253
262
|
const pivotLayout = {
|
|
254
263
|
PivotColumns,
|
|
255
264
|
ColumnPinning: layout.ColumnPinning,
|
|
256
265
|
ColumnSorts: layout.ColumnSorts,
|
|
257
|
-
ColumnWidths
|
|
266
|
+
ColumnWidths,
|
|
258
267
|
ColumnVisibility: layout.ColumnVisibility,
|
|
259
268
|
RowGroupValues: layout.RowGroupValues,
|
|
260
269
|
PivotGroupedColumns: layout.RowGroupedColumns,
|
|
@@ -821,7 +830,10 @@ export class LayoutManager extends LMEmitter {
|
|
|
821
830
|
return acc;
|
|
822
831
|
}, {});
|
|
823
832
|
columnState.applyOrder = true;
|
|
824
|
-
const columnIds = getColumnOrderIdsForAllColDefs([
|
|
833
|
+
const columnIds = getColumnOrderIdsForAllColDefs([
|
|
834
|
+
...layout.PivotColumns,
|
|
835
|
+
...(layout.PivotAggregationColumns || []).map((col) => col.ColumnId),
|
|
836
|
+
], this.gridApi.getColumnDefs());
|
|
825
837
|
const pivotAggsToIndexes = layout.PivotAggregationColumns.reduce((acc, { ColumnId }, index) => {
|
|
826
838
|
acc[ColumnId] = index;
|
|
827
839
|
return acc;
|
|
@@ -1036,6 +1048,23 @@ export class LayoutManager extends LMEmitter {
|
|
|
1036
1048
|
// now recompute and apply the last one
|
|
1037
1049
|
this.computePivotAggregations(layout, columnState);
|
|
1038
1050
|
this.gridApi.applyColumnState(columnState);
|
|
1051
|
+
// let's also include the column widths of the pivotResult columns
|
|
1052
|
+
// we can't simply include those in the columnState because the columnState will also apply order
|
|
1053
|
+
// but we don't want to affect the order of the pivotResult columns
|
|
1054
|
+
// so we'll do it manually, and apply the widths after the columnState
|
|
1055
|
+
// by using the gridApi.setColumnWidths method
|
|
1056
|
+
if (layout.ColumnWidths) {
|
|
1057
|
+
const colWidthForPivotResultColumns = [];
|
|
1058
|
+
(this.gridApi.getPivotResultColumns() || []).forEach((col) => {
|
|
1059
|
+
const colId = col.getColId();
|
|
1060
|
+
if (layout.ColumnWidths[colId]) {
|
|
1061
|
+
colWidthForPivotResultColumns.push({ key: colId, newWidth: layout.ColumnWidths[colId] });
|
|
1062
|
+
}
|
|
1063
|
+
});
|
|
1064
|
+
if (colWidthForPivotResultColumns.length) {
|
|
1065
|
+
this.gridApi.setColumnWidths(colWidthForPivotResultColumns);
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1039
1068
|
this.applyPivotExpandLevel(layout);
|
|
1040
1069
|
const hasGroupedColumns = layout.PivotGroupedColumns && layout.PivotGroupedColumns.length;
|
|
1041
1070
|
// but also let's not forget to apply the row group values
|