-
Notifications
You must be signed in to change notification settings - Fork 341
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
base: main
Are you sure you want to change the base?
Conversation
This is great, I was just looking for |
You are welcome |
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 |
There was a problem hiding this 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 newgetRowSpanBounds
utility. - Updates rendering in
drawCells
anddrawFillHandle
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);
You can recreate this by setting default value for allowWrapping in drawTextCell as true
