Skip to content

Commit

Permalink
Update packages/grid/x-data-grid/src/components/GridRow.tsx
Browse files Browse the repository at this point in the history
Co-authored-by: Andrew Cherniavskii <andrew.cherniavskii@gmail.com>
Signed-off-by: Rom Grk <romgrk@users.noreply.github.com>
  • Loading branch information
romgrk and cherniavskii authored Jul 21, 2023
1 parent b9c7537 commit 22ce1e5
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions packages/grid/x-data-grid/src/components/GridRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -398,14 +398,12 @@ const GridRow = React.forwardRef<HTMLDivElement, GridRowProps>(function GridRow(

let indexRelativeToAllColumns = firstColumnToRender + i;

if (
focusedCellColumnIndexNotInRange !== undefined &&
visibleColumns[focusedCellColumnIndexNotInRange].field === column.field &&
focusedCell
) {
indexRelativeToAllColumns = focusedCellColumnIndexNotInRange;
} else if (focusedCellColumnIndexNotInRange !== undefined && focusedCell) {
indexRelativeToAllColumns -= 1;
if (focusedCellColumnIndexNotInRange !== undefined && focusedCell) {
if (visibleColumns[focusedCellColumnIndexNotInRange].field === column.field) {
indexRelativeToAllColumns = focusedCellColumnIndexNotInRange;
} else {
indexRelativeToAllColumns -= 1;
}
}

const cellColSpanInfo = apiRef.current.unstable_getCellColSpanInfo(
Expand Down

0 comments on commit 22ce1e5

Please sign in to comment.