-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Add <Datagrid rowSx>
prop to customize row style for each record
#8925
Add <Datagrid rowSx>
prop to customize row style for each record
#8925
Conversation
fa97f44
to
50c31a1
Compare
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.
Thanks! This is nice but please make it an alternative to rowStyle
, not a replacement.
Sorry, I was busy this week. I will make the change next Tuesday. |
Sorry for the delay, I have had a back pain in last few weeks that kept me away from computer. I have add Please let me know if there is any thing needed to be updated about this PR. |
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.
Looks great! Thanks! I hope you feel better now :)
Co-authored-by: Gildas Garcia <[email protected]>
Co-authored-by: Gildas Garcia <[email protected]>
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.
Great! Thanks!
Thanks for your PR! However, I'm not very fond of this change. First, it adds some duplication. I know it's for backward compatibility, but the doc for Second, we already have an Waiting for more feedback to decide. |
Hi, @fzaninotto . I made this change to have a method to style a single cell. We can add I think BTW, if we decide to move on with |
I actually think |
Personally, I'm also in favor of adding the |
Seems I'm in minority, so we'll go for it! I'll just deprecate the Thanks for your contribution! |
<Datagrid rowSx>
prop to customize row style for each record
This PR intends to substitute
rowStyle
byrowSx
for styling theDatagrid
andSimpleList
rows for two reasons:Sx
is more common in mui instead ofstyle
to style.rowStyle
will apply to the whole row. If one wants to highlight specific cells in the datagrid body, for example highlight duplicate phone numbers, they have to write their ownDatagridBody
andDatagridBodyRow
. Meanwhile,rowSx
can fix the problem.Follow up of #8630