Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(tables): only add real row positions in shift-click range select
Previously the loop added every integer from..to, which in sparse
tables (with deleted rows) could add thousands of phantom gap positions.
Now iterates positionMap to only add positions with actual rows.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
  • Loading branch information
waleedlatif1 and claude committed Mar 17, 2026
commit ad3461656ea9fb20fa66e8fcb40ddee58b9cc932
Original file line number Diff line number Diff line change
Expand Up @@ -539,10 +539,11 @@ export function Table({
if (shiftKey && lastCheckboxRowRef.current !== null) {
const from = Math.min(lastCheckboxRowRef.current, rowIndex)
const to = Math.max(lastCheckboxRowRef.current, rowIndex)
const pMap = positionMapRef.current
setCheckedRows((prev) => {
const next = new Set(prev)
for (let i = from; i <= to; i++) {
next.add(i)
for (const [pos] of pMap) {
if (pos >= from && pos <= to) next.add(pos)
}
return next
})
Comment thread
waleedlatif1 marked this conversation as resolved.
Expand Down
Loading