Skip to content

fix(data-grid): fix ranged pasting - #1137

Merged
sadmann7 merged 2 commits into
mainfrom
sadman/paste-ranged
Jun 14, 2026
Merged

fix(data-grid): fix ranged pasting#1137
sadmann7 merged 2 commits into
mainfrom
sadman/paste-ranged

Conversation

@sadmann7

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings June 14, 2026 11:08
@vercel

vercel Bot commented Jun 14, 2026

Copy link
Copy Markdown

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

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 addresses issues with data-grid paste handling, particularly ranged pasting behavior and parsing clipboard TSV content across different line-ending formats.

Changes:

  • Normalize unquoted TSV parsing to handle Windows CRLF by stripping trailing \r per line.
  • Improve paste behavior to support filling a selection when the clipboard contains a single cell value.
  • Adjust onDataUpdate to better handle updates that may involve rows not yet reflected in propsRef.current.data, and update the generated registry snapshot.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 4 comments.

File Description
src/lib/data-grid.ts Normalizes TSV line parsing by stripping trailing carriage returns for CRLF clipboard content.
src/hooks/use-data-grid.ts Updates paste/update logic to better cover ranged pasting scenarios (single-cell fill + row update range handling) and tweaks select paste empty handling.
public/r/data-grid.json Updates the registry snapshot to reflect the latest use-data-grid and data-grid source contents.

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

Comment thread src/hooks/use-data-grid.ts
Comment thread src/hooks/use-data-grid.ts
Comment thread src/hooks/use-data-grid.ts
Comment thread src/lib/data-grid.ts
@sadmann7
sadmann7 merged commit 726ac83 into main Jun 14, 2026
7 checks passed
@sadmann7
sadmann7 deleted the sadman/paste-ranged branch June 14, 2026 11:56
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