feat(data-grid): add readOnly mode to select column#1100
Merged
Conversation
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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
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
readOnlyprop 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.