UNPKG

@progress/kendo-angular-grid

Version:

Kendo UI Grid for Angular - high performance data grid with paging, filtering, virtualization, CRUD, and more.

25 lines (24 loc) 972 B
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ /** * @hidden */ export class RowspanService { skipCells = []; addCells(rowIndex, colIndex, rowspan) { for (let i = 1; i < rowspan; i++) { if (!this.skipCells.some(this.cellExists(rowIndex + i, colIndex))) { this.skipCells.push({ rowIndex: rowIndex + i, colIndex }); } } } reset() { this.skipCells = []; } shouldSkip(rowIndex, colIndex) { return !!this.skipCells.find(this.cellExists(rowIndex, colIndex)); } cellExists = (rowIndex, colIndex) => cell => cell.rowIndex === rowIndex && cell.colIndex === colIndex; }