Skip to content

feat(DataGrid): Ability to customize content cell styles using contentStyle#124

Merged
a11delavar merged 6 commits intomainfrom
data-grid-cell-style
Dec 16, 2025
Merged

feat(DataGrid): Ability to customize content cell styles using contentStyle#124
a11delavar merged 6 commits intomainfrom
data-grid-cell-style

Conversation

@a11delavar
Copy link
Collaborator

No description provided.

@a11delavar a11delavar requested a review from Copilot December 16, 2025 15:26
Copy link

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 introduces the ability to customize content cell styles in DataGrid columns using a new contentStyle property. The feature allows developers to apply conditional styling to cells based on their values and data.

  • Adds contentStyle property that accepts string, CSSResult, or function returning either type
  • Refactors cell rendering to remove wrapper div and apply styles directly to host element
  • Includes comprehensive test coverage for various contentStyle configurations

Reviewed changes

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

Show a summary per file
File Description
packages/DataGrid/columns/DataGridColumnComponent.ts Adds contentStyle property and converts methods to properties for binding
packages/DataGrid/DataGridColumn.ts Defines DataGridColumnContentStyle type and adds contentStyle field
packages/DataGrid/DataGridCell.ts Implements contentStyle rendering logic and refactors cell layout
packages/DataGrid/DataGrid.ts Updates type signatures from unknown to any for improved flexibility
packages/DataGrid/DataGrid.test.ts Adds comprehensive tests for contentStyle functionality
packages/DataGrid/DataGrid.stories.ts Adds story demonstrating contentStyle usage with balance coloring

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

@a11delavar a11delavar merged commit ce02edb into main Dec 16, 2025
3 checks passed
@a11delavar a11delavar deleted the data-grid-cell-style branch December 16, 2025 15:53
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