Repository navigation
Fix colSpan called as a summary row on column group header rows - #4220
Merged
Merged
Conversation
When navigating to a column group header row, `getCellColSpan` fell through
to the bottom summary rows branch and called `colSpan` with
`{ type: 'SUMMARY', row: undefined }`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4220 +/- ##
==========================================
+ Coverage 98.36% 98.41% +0.05%
==========================================
Files 45 45
Lines 1955 1955
Branches 727 727
==========================================
+ Hits 1923 1924 +1
+ Misses 32 31 -1
🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Found while working on #4219.
In a grid with column groups and bottom summary rows, moving the active cell into a column group header row called the user's
colSpanwith{ type: 'SUMMARY', row: undefined }.getCellColSpanchecks for the main header row, then top summary rows, then data rows. Any otherrowIdxfell through to the bottom summary rows branch, and that included column group header rows above the main header row. SobottomSummaryRows[rowIdx - rows.length]read a negative index. AcolSpanthat readsargs.rowfor summary rows would throw, and one that returns a span for summary rows would move the active cell to the wrong column.The bottom summary rows branch now also requires
rowIdx >= rows.length. Column group header rows fall through toreturn undefined, which is what we want because column group header cells don't usecolSpan.The new test failed in Chromium, Firefox, and WebKit before the fix.
🤖 Generated with Claude Code