Skip to content

feat(data-grid): render editable cell for column definition - #1304

Open
sadmann7 wants to merge 8 commits into
mainfrom
sadman/data-grid-custom-cell
Open

sadmann7 wants to merge 8 commits into
mainfrom
sadman/data-grid-custom-cell

Conversation

@sadmann7

@sadmann7 sadmann7 commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

A column could only be edited through a built-in variant, so a value too rich to type in place, like tags, key-value pairs or a small form, had no way to get an editor.

  • meta.cellComponent renders a column's cell with the same props as a built-in cell, so it opens on Enter, F2 or a double click and edits through cell.setValue. It reads its value with useCellValue, since live updates patch rows in place. It works alongside variant, which keeps that variant's filtering, sorting and paste.
  • meta.parseValue(text) parses pasted text for any column, returning undefined to skip the cell. meta.emptyValue is what a cleared cell gets.
  • A cellComponent without a variant treats its value as opaque: paste skips it unless parseValue is set, clearing sets null, and copying writes JSON.
  • Search matches the values inside object and array cells, not their keys, so searching "name" no longer matches every contact or file cell.
  • CellEditorPopover is exported from both bases with the same props. The radix version reads the row height from the table instead of taking rowHeight.
  • The data grid demo gets an Emergency Contact column: a name and phone form in a popover, with Tab and Enter kept inside the form. Closing it saves, and Escape discards, like the long text cell.

Fixes #1296

@vercel

vercel Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
tablecn Ready Ready Preview Nov 23, 2026 5:07pm UTC

Request Review

Copilot AI balanced review requested due to automatic review settings November 13, 2026 15:50

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

This branch was successfully deployed

1 active deployment
Preview — f9f6c4e2 Deployed Nov 23, 2026 by vercel[bot]
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.

[feat]: Data Grid — let a column render an editable cell of its own

2 participants