Skip to content

Fix selectableRows limit enforcement in selectRows method#4887

Open
rathboma wants to merge 2 commits into
masterfrom
claude/amazing-cannon-cvbqS
Open

Fix selectableRows limit enforcement in selectRows method#4887
rathboma wants to merge 2 commits into
masterfrom
claude/amazing-cannon-cvbqS

Conversation

@rathboma
Copy link
Copy Markdown
Collaborator

@rathboma rathboma commented Jun 4, 2026

Summary

Fixed a bug where the selectRows() public API was ignoring the selectableRows limit by passing force=true to the internal _selectRow() method, which bypassed the row selection cap.

Changes

  • Removed the force=true parameter from _selectRow() calls in the selectRows() method (lines 261 and 272)
  • This allows the selectableRows limit and rolling selection logic to be properly enforced when selecting rows via the public API
  • Added comprehensive test coverage for the fix:
    • Test for enforcing selectableRows limit with rolling selection enabled
    • Test for enforcing selectableRows limit when passing an array of rows
  • Minor formatting cleanup (trailing whitespace removal)

Implementation Details

The bug occurred because selectRows() was unconditionally passing force=true to _selectRow(), which bypassed the internal logic that enforces the selectableRows limit. By removing this parameter, the method now respects both the row selection cap and the rolling selection behavior as intended.

https://claude.ai/code/session_01G91RP3NWPHHcnwbbAuyycB

claude added 2 commits June 4, 2026 17:15
…4881)

Adds two failing unit tests that capture the bug reported in #4881:
the public selectRow API ignores the selectableRows cap because
selectRows() passes force=true to _selectRow, bypassing the limit
guard. Tests cover both repeated single-row calls and a single
array call that exceeds the limit.
selectRows() called _selectRow with force=true, which bypassed the
selectableRows cap and the rolling-selection deselect logic. Drop
the force flag so the public selectRow API matches the behavior of
click-based selection: respect the maximum and roll off the oldest
selection when the cap is reached.
@rathboma rathboma requested a review from azmy60 June 4, 2026 18:41
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