Repository navigation
Clarify mapViewportColumns docs, skip unneeded colSpan args, and test header and summary rows - #4226
Merged
Merged
Conversation
…test header and summary rows - Document that an active row left out by virtualization only renders its active cell, and that a cell's colSpan can skip the active column too - Only build the colSpan args of the rendered rows when an unfrozen column before the overscan range could span into it - Run the colSpan regression tests on header and summary rows as well Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4226 +/- ##
=======================================
Coverage 98.58% 98.58%
=======================================
Files 46 46
Lines 1984 1985 +1
Branches 750 750
=======================================
+ Hits 1956 1957 +1
Misses 28 28
🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-ups to #4225 from a review of it.
Docs
The
mapViewportColumnsJSDoc, mirrored in the README, said the active cell is always rendered. Two cases weren't covered:DataGridstill renders it, but itsmapViewportColumnsonly maps the active cell, or nothing when the whole row is active.colSpancan cover the active column, which is then skipped like any other spanned column.Fewer allocations in the
startIdxmemoThe memo built the
colSpanargs of every rendered row whenevercolOverscanStartIdx > 0and any column hadcolSpan, even when no column could span into the overscan range, e.g., when everycolSpancolumn is frozen or after the range. It now looks for candidate columns first, and only builds the args when there are some.Tests
The regression tests for cells hidden by
colSpanonly covered data rows, but the bug also affected header and summary rows. The three tests now run on all three row types. All 9 fail on the parent of #4225 and pass now.🤖 Generated with Claude Code