UNPKG

devextreme

Version:

HTML5 JavaScript Component Suite for Responsive Web Development

23 lines (22 loc) 903 B
/** * DevExtreme (esm/__internal/grids/data_grid/summary/utils.js) * Version: 25.2.3 * Build date: Fri Dec 12 2025 * * Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/ */ import { isDefined } from "../../../../core/utils/type"; export function getSummaryCellIndex(column, prevColumn) { let isGroupRow = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : false; const cellIndex = column.index ?? -1; if (!isGroupRow) { return cellIndex } if ("groupExpand" === (null === prevColumn || void 0 === prevColumn ? void 0 : prevColumn.type) || "groupExpand" === column.type) { return (null === prevColumn || void 0 === prevColumn ? void 0 : prevColumn.index) ?? -1 } return !isDefined(column.groupIndex) ? cellIndex : -1 }