-
Notifications
You must be signed in to change notification settings - Fork 839
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] Remove cell actions onmouseleave #5120
[EuiDataGrid] Remove cell actions onmouseleave #5120
Conversation
Preview documentation changes for this PR: https://eui.elastic.co/pr_5120/ |
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.
Not sure if we want to block this PR to figure out the animation issue Caroline highlighted, but code-wise at least this LGTM. Depending on whether this or #5125 gets in first, I can add a small .simulate
unit test as well for this event.
I wasn't able to find an obvious quick fix, I'll see if there's not already an issue for that and if not, make one. EDIT now tracked in #5134 |
Preview documentation changes for this PR: https://eui.elastic.co/pr_5120/ |
Summary
Fixes #5116
Datagrid cells avoid rendering their cell actions unless the cell is focused or the mouse cursor is over the cell. To handle the mouse hovering interaction, we set an internal state on the cell but never unset it when the mouse leaves, which left all the action DOM in place even when it's hidden. This PR resets that state
onMouseLeave
, removing the cell action buttons from the DOM when not needed.Checklist
- [ ] Check against all themes for compatibility in both light and dark modes- [ ] Checked in mobile- [ ] Props have proper autodocs and playground toggles- [ ] Added documentation- [ ] Checked Code Sandbox works for the any docs examples- [ ] Checked for accessibility including keyboard-only and screenreader modes