-
Notifications
You must be signed in to change notification settings - Fork 844
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
[EuiDataGrid] Fixed: Cell styling retains when column position is changed #4601
Conversation
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
jenkins test this |
Preview documentation changes for this PR: https://eui.elastic.co/pr_4601/ |
return () => { | ||
setCellProps({ | ||
style: { | ||
backgroundColor: 'transparent', |
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'll leave it to @chandlerprall or @thompsongl on whether it's best to address this at the docs layer or in the component itself, but I think we're going to want to set this to the $euiColorEmptyShade
color rather than transparent. This would be needed since the panel might carry a background.
Fixed the issue with |
@akashgp09 my apologies for missing this one; instead of requiring the application code to reset the cell props, we'll want to find a way in data_grid_cell.tsx to detect when the component changes to represent a different cell and reset the value there. |
Closing, this should have been addressed in source code in #5068 |
Summary
This PR Fixes: #4599
Fixed
EuiDataGrid
retaining cells style when column position is changed.Approach: By adding a cleanup function inside the useEffect hook fixes this.
Screenshots
Before
After
Checklist
- [ ] Props have proper autodocs and playground toggles- [ ] Added documentation- [ ] Checked Code Sandbox works for the any docs examples- [ ] Added or updated jest tests-[ ] Checked for breaking changes and labeled appropriately- [ ] Checked for accessibility including keyboard-only and screenreader modes