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

Use rowSx instead of rowStyle to style selected cell based on row record #8630

Closed
wants to merge 1 commit into from

Conversation

zhujinxuan
Copy link
Contributor

@zhujinxuan zhujinxuan commented Feb 7, 2023

This PR intends to add rowSxinstead of rowStyle for styling the Datagrid rows for two reasons:

  1. Sx is more common in mui instead of style to style.
  2. 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 own DatagridBody and DatagridBodyRow. Meanwhile, rowSx can fix the problem.

rowStyle has been kept in this PR for compatibility.

I have not yet updated the spec and docs according to `rowSx'. If you think this change is good, I will update docs and spec in the same PR.

@fzaninotto
Copy link
Member

Thanks. As this is a new feature, it should be PR'ed against next rather than master, and your PR should include unit tests and documentation for the new feature.

@zhujinxuan
Copy link
Contributor Author

Got it! I will submit a new PR against the next branch.

@zhujinxuan zhujinxuan closed this Feb 14, 2023
@mshd
Copy link
Contributor

mshd commented May 10, 2023

Hi @zhujinxuan have you submitted your PR. I'm trying to change the background color of individual cells based on the record. I think your PR will make this possible.

@zhujinxuan
Copy link
Contributor Author

@mshd I haven't yet submitted the new PR to next branch. I will do it on this weekend.

@mshd
Copy link
Contributor

mshd commented May 11, 2023

Great, appreciate it! @zhujinxuan

@mshd
Copy link
Contributor

mshd commented May 15, 2023

Hey @zhujinxuan did you get to it. Should I help?

@zhujinxuan
Copy link
Contributor Author

@mshd The new PR is just finished and waiting for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants