Skip to content

End keyboard column resizes on keyup and blur - #4249

Merged
nstepien merged 2 commits into
mainfrom
end-keyboard-resize
Oct 27, 2026
Merged

nstepien merged 2 commits into
mainfrom
end-keyboard-resize

Conversation

@nstepien

Copy link
Copy Markdown
Collaborator

Only the resize handle's onLostPointerCapture called onColumnResizeEnd, so resizing a column with Ctrl+ArrowLeft or Ctrl+ArrowRight never ended the resize. isColumnResizing stayed true until the user finished resizing a column with the pointer, and until then:

  • The grid didn't call onColumnWidthsChange.
  • With columnWidths and onColumnWidthsChange, the grid used its internal widths and ignored the columnWidths prop. For example, setColumnWidths(new Map()) didn't reset the widths.

Changes

  • The header cell ends a keyboard resize when a key is released, and when it loses focus, as the key may then be released elsewhere.
  • Three tests in resizable.test.tsx cover the key release, the loss of focus, and the columnWidths prop after a keyboard resize. They fail on main in Chromium.

Split from #4005.

vp run ci passes.

🤖 Generated with Claude Code

Only the resize handle's lost pointer capture ended a column resize.
After a resize with Ctrl+Arrow keys, the grid didn't call
`onColumnWidthsChange`, and ignored the `columnWidths` prop until the user
finished resizing a column with the pointer.

Split from #4005.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov-commenter

codecov-commenter commented Oct 26, 2026 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.23%. Comparing base (9917439) to head (da26d59).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4249   +/-   ##
=======================================
  Coverage   99.22%   99.23%           
=======================================
  Files          44       44           
  Lines        2207     2215    +8     
  Branches      971      974    +3     
=======================================
+ Hits         2190     2198    +8     
  Misses         17       17           
Files with missing lines Coverage Δ
src/HeaderCell.tsx 98.36% <100.00%> (+0.06%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nstepien
nstepien merged commit ea55f62 into main Oct 27, 2026
7 of 8 checks passed
@nstepien
nstepien deleted the end-keyboard-resize branch October 27, 2026 04:09
nstepien added a commit that referenced this pull request Oct 27, 2026
#4249 added the same keyboard resize code and test as this branch, in other places: keep one copy of each.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

2 participants