Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Minor BC] Fix <Datagrid> does not apply className to its root element #8804

Merged
merged 1 commit into from
Apr 7, 2023

Conversation

slax57
Copy link
Contributor

@slax57 slax57 commented Apr 4, 2023

Problem

<Datagrid> does not apply className to its root element, but rather to its nested Table element.

This creates a discrepancy between styles applied via sx and styles applied via styled.

This is among others visible with the (EE) <EditableDatagrid> component.

Solution

sx and className should be applied to the same component, i.e. <DatagridRoot>.

⚠️ ⚠️ ⚠️ Breaking change ⚠️ ⚠️ ⚠️

This change is technically a BC. But it should be really minor as it would affect only people that use styled to apply styles to the Datagrid component. People applying styles via sx shouldn't be affected.

Screenshots (of the added story)

Before

Capture d’écran du 2023-04-04 16-56-52

After

Capture d’écran du 2023-04-04 16-56-26

@fzaninotto
Copy link
Member

To be moved to next

@slax57 slax57 changed the base branch from master to next April 7, 2023 08:59
@slax57 slax57 added RFR Ready For Review and removed WIP Work In Progress labels Apr 7, 2023
@slax57 slax57 changed the title Fix <Datagrid> does not apply className to its root element [Small BC] Fix <Datagrid> does not apply className to its root element Apr 7, 2023
@slax57 slax57 changed the title [Small BC] Fix <Datagrid> does not apply className to its root element [Minor BC] Fix <Datagrid> does not apply className to its root element Apr 7, 2023
@djhi djhi merged commit 27fc437 into next Apr 7, 2023
@djhi djhi deleted the Datagrid-className branch April 7, 2023 09:24
@djhi djhi added this to the 4.10.0 milestone Apr 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFR Ready For Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants