Skip to content

Row Span compatibility added #949

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

subashraja1803
Copy link

You can recreate this by setting default value for allowWrapping in drawTextCell as true
Screenshot 2024-05-06 230902

@vydimitrov
Copy link

This is great, I was just looking for rowSpan or I a way to merge cells in a column. Thanks!

@subashraja1803
Copy link
Author

This is great, I was just looking for rowSpan or I a way to merge cells in a column. Thanks!

You are welcome

@divyanshupundir
Copy link

Great work! Ths is exactly what I was looking for. Is there a chance for this to get merged anytime soon?

@subashraja1803
Copy link
Author

Great work! Ths is exactly what I was looking for. Is there a chance for this to get merged anytime soon?

I am not sure about merge, But if you want you can make these changes to your own fork

@lukasmasuch lukasmasuch requested a review from Copilot June 18, 2025 02:22
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds vertical span (rowSpan) support to DataGrid rendering, selection, and user interactions.

  • Introduces rowSpan property in cell types and new getRowSpanBounds utility.
  • Updates rendering in drawCells and drawFillHandle to account for row spans.
  • Extends selection logic (cellIsSelected, expandSelection) and example stories to demonstrate row spans.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/core/src/internal/data-grid/render/data-grid.render.rings.ts Import rowSpan bounds and adjust fill handle positioning for row spans
packages/core/src/internal/data-grid/render/data-grid-render.walk.ts Add getRowSpanBounds to compute vertical span geometry
packages/core/src/internal/data-grid/render/data-grid-render.cells.ts Clip and draw cells with row spans, handle row-span highlighting
packages/core/src/internal/data-grid/render/data-grid-lib.ts Extend cellIsSelected to consider rowSpan
packages/core/src/internal/data-grid/data-grid-types.ts Add rowSpan to BaseGridCell interface
packages/core/src/docs/examples/span-cell.stories.tsx Update story to demonstrate rowSpan
packages/core/src/data-editor/data-editor-fns.ts Extend expandSelection to include row spans
Comments suppressed due to low confidence (1)

packages/core/src/internal/data-grid/render/data-grid.render.rings.ts:252

  • getRowHeight is not imported in this file, leading to a runtime error. Add the appropriate import for getRowHeight from the module where it’s defined.
                    let cellHeight = getRowHeight(row);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants