Repository navigation
Description
Describe the bug
Depending on the scroll position within the EuiDataGrid, the cell actions menu can actually appear behind the header and/or footer, potentially causing users to not realize the actions are available.
There are two cases in which this bug can occur:
1. When scrolling, a user can lose sight of the actions menu when it scrolls behind the header cells
On it's own, I don't perceive this as a big issue. I believe most users would simply scroll the actions back into view just like any other content that gets scrolled out of view. However, it's made worse by the next scenario.
3. When a user clicks on a cell and it snaps into focus, the actions menu is not visible
Because it focuses as top-aligned, the user never sees the actions menu and is unaware that it is scrolled out of view.
Impact and severity
Short of any real user data here, I perceive this as likely a low severity issue. My hunch is that most users familiar with using the Data Grid will realize this is happening and work around it. However, it could be a persistent annoyance for users, and is likely worse for users that are new to using the Data Grid.
Environment and versions
- EUI version: v100
- React version:
- Kibana version (if applicable):
- Browser:
- Operating System:
To Reproduce
Steps to reproduce the behavior:
- Go to https://eui.elastic.co/#/tabular-content/data-grid#virtualization
- Focus a cell and scroll, or click on a cell that is partially above the current datagrid view box. Reference the example videos above to reproduce concisely.
Expected behavior
At no point should the actions menu be hidden behind content when a cell is focused.
Minimum reproducible sandbox
N/A - It's reproducible directly in the docs.
Screenshots
N/A - Videos included above
Proposal
We considered the easiest solution here to be simply adjusting the z-index of the actions menu. The UX would not be great:

We also considered placing the actions menu below the cell at all times, rather than above, but we'll encounter the same issues with the bottom of the table as we do currently with the top.
We currently think the best solution would be to dynamically show the actions menu below the cell (rather than above) in cases where it scrolls past the top of the data grid view. We would implement this with an intersection observer. The primary concern here would be that is could degrade performance. Our proposal here would be to do a quick spike of this behavior to share with the OP and design teams to consider both performance and UX.


Activity
JasonStoltz commentedon Mar 27, 2025
We discussed this in person.
We think there may be a simpler solution where we simply apply an offset to the scroll/focus behavior to accomodate the actions menu.
If it works technically, we'll need to validate it with design team.
weronikaolejniczak commentedon Apr 25, 2025
Hey @ryankeairns @ek-so what do you think about this solution?
Screen.Recording.2025-04-25.at.17.01.22.mov
Clicking or focusing a cell scrolls it into view with enough space for the actions menu. You can test this in the staging docs.
The menu can still be hidden behind the header when scrolling, but as noted:
This issue doesn’t affect the first row, so no problem there:
ek-so commentedon Apr 28, 2025
Thanks @weronikaolejniczak! Overall, works fine from my pov. A couple of notes:
weronikaolejniczak commentedon Apr 28, 2025
I'm sorry peeps for the crazy task history but dragging tasks across the board sometimes causes rapid scrolling and moves the item into another column 😅 I think I'll switch to status select from now on.
@ek-so
Ad 1. On the surface it seems like the actions menu
z-indexis purposefully set to higher value than the header so that it's visible for the first row. All the other actions menu have a lowerz-indexso they scroll under the header.Not sure what to do about this 🤔 In theory I could reset the
z-indexto lower when the table is scrolled the height of the first actions menu BUT that would involve an intersection observer, hacky logic, not sure if it's worth it. Might be worth looking into it on a separate task.Ad 2. Agreed! This might be simple to fix with
behavior: smoothbut ifprefers-reduced-motionis set then the scrolling will still be snappy. I'll try making it smooth 😄JasonStoltz commentedon Apr 28, 2025
FWIW, this is a pre-existing issue, so I think it would be fine to handle it separately.
weronikaolejniczak commentedon Apr 29, 2025
Actually, smooth-scrolling might not be as easy to implement as I thought because we use
scrollTofromreact-windowwhich doesn't support smooth scrolling out-of-box and isn't affected by things like CSSscroll-behavior. There are custom solutions to this but involve custom logic that might be tricky to implement in our data grid. I'd say let's focus on the issue at hand, and try to figure out the above-mentioned issues on separate tasks. I created both:JasonStoltz commentedon Apr 29, 2025
@weronikaolejniczak Is there any way to conditionally not do the offset for the last row in the grid? It currently offsets the last row too far down.