const maxGridIndex = cellMap.reduce(
        (foundIndex: number, index, cellIndex) =>
          index != null && !disabledIndices?.includes(index)
            ? cellIndex
            : foundIndex,