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

[DataGrid] Fix CSS footer spacing #268

Merged
merged 2 commits into from
Sep 14, 2020

Conversation

oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Sep 12, 2020

Fix margin on:

Capture d’écran 2020-09-12 à 18 30 56

Also work a bit on #6.

@@ -1,5 +1,5 @@
import * as React from 'react';
import { ColDef, XGrid, GridOverlay, Footer, useApiRef, ApiRef } from '@material-ui/x-grid';
import { ColDef, XGrid, GridOverlay, GridFooter, useApiRef, ApiRef } from '@material-ui/x-grid';
Copy link
Member Author

@oliviertassinari oliviertassinari Sep 12, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefix public components with Grid, as we will re-export them from @material-ui/x later on, avoid conflicts.

@@ -195,7 +195,7 @@ export const useStyles = makeStyles(
alignItems: 'center',
...theme.typography.body2,
display: 'none',
paddingLeft: theme.spacing(2),
margin: theme.spacing(0, 2),
Copy link
Member Author

@oliviertassinari oliviertassinari Sep 12, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix, the rest is refactorization.

@oliviertassinari oliviertassinari added bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! labels Sep 12, 2020
export function GridOverlay(props: DivProps) {
type GridOverlayProps = React.HTMLAttributes<HTMLDivElement>;

export function GridOverlay(props: GridOverlayProps) {
Copy link
Member Author

@oliviertassinari oliviertassinari Sep 13, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One this component, it seems that we can kill the <div className="MuiDataGrid-overlayContent" /> element. It will make customization easier. I will look closer at the issue later.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, it's used in creating the no row message and error-message, and potentially more components.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm saying that because I didn't see something in the CSS that would prevent. We will see, I could be wrong. It needs to be done in an isolated pull request anyway.

@oliviertassinari oliviertassinari merged commit c29f3f3 into mui:master Sep 14, 2020
@oliviertassinari oliviertassinari deleted the fix-padding-bug branch September 14, 2020 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants