Skip to content

fix(data-grid): exclude non-navigable columns during copying#1117

Merged
sadmann7 merged 2 commits intomainfrom
sadman/fix-paste-checkbox-row-selection
Feb 24, 2026
Merged

fix(data-grid): exclude non-navigable columns during copying#1117
sadmann7 merged 2 commits intomainfrom
sadman/fix-paste-checkbox-row-selection

Conversation

@sadmann7
Copy link
Copy Markdown
Owner

When copying cells after selecting rows via checkbox, the copy operation was including the "select" column (and other non-navigable columns) in the TSV output. This caused an empty leading column in the clipboard data, which then shifted all pasted values by one column when pasting.

The fix filters out non-navigable columns (select, actions) in the serializeCellsToTsv function so they are not included in the copied TSV data.

Copilot AI review requested due to automatic review settings February 24, 2026 11:08
@vercel
Copy link
Copy Markdown

vercel bot commented Feb 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tablecn Ready Ready Preview, Comment Feb 24, 2026 11:17am

Request Review

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a clipboard data shifting issue where copying cells after selecting rows via checkbox included non-navigable columns ("select", "actions") in the TSV output, causing an empty leading column that shifted pasted values by one column.

Changes:

  • Added filtering logic in serializeCellsToTsv to skip non-navigable columns during the copy operation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

When copying cells after selecting rows via checkbox, the copy operation was including the "select" column (and other non-navigable columns) in the TSV output. This caused an empty leading column in the clipboard data, which then shifted all pasted values by one column when pasting.

The fix:
1. Skips non-navigable columns (select, actions) during iteration in serializeCellsToTsv
2. Builds a navigableCells array as we iterate (more efficient than filtering afterward)
3. Returns navigableCells for accurate cell counts in toast messages and cutCells state

Co-authored-by: Cursor <cursoragent@cursor.com>
@sadmann7 sadmann7 force-pushed the sadman/fix-paste-checkbox-row-selection branch from 1876a6f to 32ce6b1 Compare February 24, 2026 11:16
@sadmann7 sadmann7 merged commit 2f6e986 into main Feb 24, 2026
7 checks passed
@sadmann7 sadmann7 deleted the sadman/fix-paste-checkbox-row-selection branch February 24, 2026 11:18
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