Fix selectableRows limit enforcement in selectRows method#4887
Open
rathboma wants to merge 2 commits into
Open
Fix selectableRows limit enforcement in selectRows method#4887rathboma wants to merge 2 commits into
rathboma wants to merge 2 commits into
Conversation
…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.
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
Fixed a bug where the
selectRows()public API was ignoring theselectableRowslimit by passingforce=trueto the internal_selectRow()method, which bypassed the row selection cap.Changes
force=trueparameter from_selectRow()calls in theselectRows()method (lines 261 and 272)Implementation Details
The bug occurred because
selectRows()was unconditionally passingforce=trueto_selectRow(), which bypassed the internal logic that enforces theselectableRowslimit. 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