-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[docs] Polish the first experience #261
[docs] Polish the first experience #261
Conversation
@@ -0,0 +1,3 @@ | |||
# Proxies | |||
# material-ui-x is configured to be hosted at the root. | |||
/static/* https://material-ui.netlify.app/static/:splat 200 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cellClassName: 'font-tabular-nums', | ||
}; | ||
|
||
const useStyles = makeStyles({ | ||
root: { | ||
'& .font-tabular-nums': { | ||
fontVariantNumeric: 'font-tabular-nums', | ||
fontVariantNumeric: 'tabular-nums', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix invalid CSS
description: 'this column has a value getter and is not sortable', | ||
headerClassName: 'highlight', | ||
headerName: 'Full name', | ||
description: 'This column has a value getter and is not sortable.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure the headers are clean: https://master--material-ui-x.netlify.app/components/data-grid/#mit-version.
|
||
```json | ||
"peerDependencies": { | ||
"@material-ui/core": "^4.9.12", | ||
"react": "^16.8.0", | ||
"styled-components": "^5.1.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgotten in the previous changes
@@ -16,6 +16,13 @@ | |||
"bin": { | |||
"datagen": "./bin/data-gen-script.js" | |||
}, | |||
"scripts": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
first for consistency and ease of usage
StatusRenderer, | ||
renderCountry, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was confused by the upper case, I thought they were components, turn out, they weren't, they were render functions. I have only realized it after trying using hooks inside, it wasn't working.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it's true, the prop where they are attached is called renderCell
</div> | ||
<Checkbox |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lighter DOM structure. Made possible with display flex, align center, justify center. I assume the div was added to fix the non-circular checkbox.
flexDirection: 'column', | ||
justifyContent: 'center', | ||
alignItems: 'center', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change might be controversial. I was surprised by the previous behavior. I couldn't understand why my custom cell was full width.
d9b8141
to
b110441
Compare
const classes = useStyles(); | ||
|
||
const handleClick = (event) => { | ||
event.preventDefault(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid opening links when testing the grid.
https://deploy-preview-261--material-ui-x.netlify.app/components/data-grid/