Skip to content

Commit a6cc251

Browse files
author
Alyar
committed
Fix jest test
1 parent 6e262c1 commit a6cc251

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

packages/devextreme/js/__internal/grids/grid_core/columns_controller/m_columns_controller.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1743,13 +1743,10 @@ export class ColumnsController extends modules.Controller {
17431743
extend(true, calculatedColumnOptions, {
17441744
allowSorting: false,
17451745
allowGrouping: false,
1746-
});
1747-
1748-
if (columnOptions?.type !== AI_COLUMN_NAME) {
1749-
calculatedColumnOptions.calculateCellValue = function () {
1746+
calculateCellValue() {
17501747
return null;
1751-
};
1752-
}
1748+
},
1749+
});
17531750
}
17541751

17551752
if (bandColumn) {

packages/devextreme/js/__internal/grids/grid_core/columns_controller/m_columns_controller_utils.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,12 @@ export const mergeColumns = (that: ColumnsController, columns, commandColumns, n
879879
commandColumnIndex = column && (column.type || column.command) ? getCommandColumnIndex(column) : -1;
880880
if (commandColumnIndex >= 0) {
881881
if (needToExtend) {
882-
result[i] = extend({ fixed: isColumnFixing }, commandColumns[commandColumnIndex], column);
882+
result[i] = extend(
883+
{ fixed: isColumnFixing },
884+
commandColumns[commandColumnIndex],
885+
column,
886+
{ calculateCellValue: commandColumns[commandColumnIndex].calculateCellValue },
887+
);
883888
if (column.type !== GROUP_COMMAND_COLUMN_NAME) {
884889
defaultCommandColumns = defaultCommandColumns.filter(callbackFilter);
885890
}

0 commit comments

Comments
 (0)