Conversation
…demo
When a column header is selected, `hot.getSelected()` returns a selection
with row index `-1`. Calling `hot.spliceCol(col, -1, amount)` triggers an
assertion error ("Expecting an unsigned number") in the internal LazyFactoryMap.
Also add a null-guard for `hot.getSelected()` in the JS/TS plain examples,
matching the defensive pattern already present in React and Angular versions.
Fixes: https://app.clickup.com/t/86c954frd (DEV-883)
https://claude.ai/code/session_01CquCfX7q6sQp19ujjDqcUD
Contributor
Author
commit: |
The docs example generator (tsc + ESLint/Prettier) does not require blank lines after single-line `if` guards (no block body). Remove the two extra blank lines from example2.js and example2.jsx so the committed files match what `docs:code-examples:generate-all-js` produces, fixing the Docs Examples CI check. https://claude.ai/code/session_01CquCfX7q6sQp19ujjDqcUD
Contributor
|
✅ Preview documentation is is available now |
…sues-with-beforeKeyDown-callback-demo
Contributor
Performance tests resultsArtifacts: performance-tests-output (open the workflow run, then download performance-tests-output).
|
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e9d0ec7. Configure here.
Also check selection[1] < 0 to prevent spliceCol(-1,...) when a row header is clicked (DEV-883). https://claude.ai/code/session_01CquCfX7q6sQp19ujjDqcUD
adrianspdev
approved these changes
Apr 9, 2026
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.

Summary
Fixes issues with the "The beforeKeyDown callback" paragraph demo on the Events and hooks guide page.
Root cause: When a column header is selected,
hot.getSelected()returns a selection with row index-1. The demo'sbeforeKeyDownhandler passed this directly tohot.spliceCol(col, -1, amount), which triggered an internal assertion error: "Assertion failed: Expecting an unsigned number".Changes:
if (selection[0] < 0) returnto skip header and corner selections in all framework examples (JS, TS, React JSX/TSX, Angular)hot.getSelected()in the plain JS/TS examples (React and Angular already had this)Fixes: https://app.clickup.com/t/86c954frd (DEV-883)
[skip changelog]
Test plan
https://claude.ai/code/session_01CquCfX7q6sQp19ujjDqcUD
Note
Low Risk
Low risk doc-example change that only adds defensive guards around selection handling to avoid runtime assertions when headers are selected.
Overview
Fixes the Events and hooks
beforeKeyDowndocumentation demos to avoid errors when a user selects a row/column header or the corner.Across Angular, React (JSX/TSX), and vanilla JS/TS examples, the handler now bails out when
getSelected()is null/undefined or when the selection contains negative row/column indices, preventing invalidspliceCol()calls.Reviewed by Cursor Bugbot for commit f829c72. Bugbot is set up for automated code reviews on this repo. Configure here.