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] Add 'nonce' prop to allow inline style if user has CSP #724

Merged

Conversation

ZeeshanTamboli
Copy link
Member

Resolves #541

Introduce nonce prop for DataGrid and XGrid. Updated docs API as well. Let me know if I missed anything or any change.

My first PR for the Material-UI organization. You guys do excellent work! Looking forward to contribute more!

Thanks!

@oliviertassinari oliviertassinari changed the title [DataGrid, XGrid] Add 'nonce' prop to allow inline style if user has CSP [DataGrid] Add 'nonce' prop to allow inline style if user has CSP Dec 12, 2020
@oliviertassinari oliviertassinari added the component: data grid This is the name of the generic UI component, not the React module! label Dec 12, 2020
@@ -123,7 +123,7 @@ export const GridComponent = React.forwardRef<HTMLDivElement, GridComponentProps
}

return (
<AutoSizer onResize={onResize}>
<AutoSizer onResize={onResize} nonce={props.nonce}>
Copy link
Member

Choose a reason for hiding this comment

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

Should it be on on the AutoSizer or GridRoot 🤔

Copy link
Member

Choose a reason for hiding this comment

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

What do you mean? nonce is not an HTML attribute in case the confusion come from there.

@oliviertassinari oliviertassinari merged commit 56800b0 into mui:master Dec 15, 2020
@oliviertassinari
Copy link
Member

@ZeeshanTamboli Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

[DataGrid] CSP nonce does not get passed to AutoSizer component
3 participants