Skip to content

Comments

feat(data-grid): add readOnly mode to select column#1100

Merged
sadmann7 merged 4 commits intomainfrom
up-datagrid
Jan 12, 2026
Merged

feat(data-grid): add readOnly mode to select column#1100
sadmann7 merged 4 commits intomainfrom
up-datagrid

Conversation

@sadmann7
Copy link
Owner

No description provided.

Extract action bar logic into a separate DataGridActionBar component for better reusability and maintainability. Refactors data-grid-live-demo to use the new component with cleaner callback handlers.
Replace custom SelectOption interface with existing CellSelectOption type for consistency across data grid components.
…on bar

- Add readOnly prop to getDataGridSelectColumn that displays row numbers and # header instead of checkboxes
- Move DataGridActionBar component to app-specific location (data-grid-live/components)
- Update data-grid-demo to demonstrate readOnly select column
- Adjust spacing and alignment for readOnly mode
Copilot AI review requested due to automatic review settings January 12, 2026 15:54
@vercel
Copy link

vercel bot commented Jan 12, 2026

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

Project Deployment Review Updated (UTC)
tablecn Ready Ready Preview Jan 12, 2026 3:54pm

Copy link
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 pull request adds a readOnly mode to the data grid select column component, which displays row numbers instead of checkboxes when enabled. The PR also includes a refactoring that extracts the action bar logic from the data-grid-live-demo into a reusable component.

Changes:

  • Added readOnly prop to select column that displays row numbers instead of checkboxes
  • Extracted ActionBar component from data-grid-live-demo into a reusable DataGridActionBar component
  • Refactored bulk update functions in data-grid-live-demo to be more specific (onStatusUpdate, onStyleUpdate)

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/components/data-grid/data-grid-select-column.tsx Added readOnly prop that renders row numbers instead of checkboxes when enabled
src/app/data-grid/components/data-grid-demo.tsx Demonstrates readOnly mode by setting it to true
src/app/data-grid-live/components/data-grid-live-demo.tsx Refactored to use new DataGridActionBar component and more specific update handlers
src/app/data-grid-live/components/data-grid-action-bar.tsx New reusable component extracted from data-grid-live-demo
public/r/data-grid-select-column.json Updated registry with new component code including readOnly support

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

@sadmann7 sadmann7 merged commit 9e20c53 into main Jan 12, 2026
13 checks passed
@sadmann7 sadmann7 deleted the up-datagrid branch January 12, 2026 15:59
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.

1 participant