[EuiDataGrid] Fixed: Cell styling retains when column position is changed#4601
[EuiDataGrid] Fixed: Cell styling retains when column position is changed#4601akashgp09 wants to merge 5 commits intoelastic:masterfrom
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.
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
EuiDataGridretaining 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