Skip to content

Commit 4860c80

Browse files
author
Alyar
committed
Fix jest test
1 parent 39890b9 commit 4860c80

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
@@ -1741,13 +1741,10 @@ export class ColumnsController extends modules.Controller {
17411741
extend(true, calculatedColumnOptions, {
17421742
allowSorting: false,
17431743
allowGrouping: false,
1744-
});
1745-
1746-
if (columnOptions?.type !== AI_COLUMN_NAME) {
1747-
calculatedColumnOptions.calculateCellValue = function () {
1744+
calculateCellValue() {
17481745
return null;
1749-
};
1750-
}
1746+
},
1747+
});
17511748
}
17521749

17531750
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
@@ -874,7 +874,12 @@ export const mergeColumns = (that: ColumnsController, columns, commandColumns, n
874874
commandColumnIndex = column && (column.type || column.command) ? getCommandColumnIndex(column) : -1;
875875
if (commandColumnIndex >= 0) {
876876
if (needToExtend) {
877-
result[i] = extend({ fixed: isColumnFixing }, commandColumns[commandColumnIndex], column);
877+
result[i] = extend(
878+
{ fixed: isColumnFixing },
879+
commandColumns[commandColumnIndex],
880+
column,
881+
{ calculateCellValue: commandColumns[commandColumnIndex].calculateCellValue },
882+
);
878883
if (column.type !== GROUP_COMMAND_COLUMN_NAME) {
879884
defaultCommandColumns = defaultCommandColumns.filter(callbackFilter);
880885
}

0 commit comments

Comments
 (0)