[EuiBasicTable/EuiInMemoryTable] Add sticky column support to actions column type#9430
Conversation
… using in composed styles
…EuiTableHeaderCell` and `EuiTableRowCell` meant for internal use
…that makes the whole column stick to the right side of the table
There was a problem hiding this comment.
As you can see, this appears broken. It's because our VRT tool uses Chrome 118 headless, which had issues rendering sticky elements.
I confirmed it's also broken like this in Chromium 118, but it got fixed since then. We're good in terms of our support table.
…learly mark it as intended for internal use only
…riable to allow customizing the background color of sticky cells
|
The CI is failing because of a snapshot with an invalid timezone. This is due to an incorrect configuration or test logic that doesn't handle daylight saving time transitions. Please ignore it in the context of this PR. |
There was a problem hiding this comment.
ℹ️ Note that we're adding unrelated VRT updates here.
These are leftovers from other PRs that missed some updates.
…r query, so it degrades gracefully in Safari and Firefox. Rename to `--euiTableCellStickyBackgroundColor`
💚 Build SucceededHistory
cc @tkajtoch |
|
/ci |
💔 Build Failed
Failed CI StepsHistory
cc @tkajtoch |
mgadewoll
left a comment
There was a problem hiding this comment.
🟢 Thanks for the additional updates! The code changes are looking great and the scrolling behavior works as expected 🎉
Summary
Resolves #9393
This PR adds sticky column support to the actions column type as a beta feature. It is currently limited to actions columns being the last column in a table.
I recommend reviewing commit by commit.
scroll-statecontainer added to<EuiTable />wrapping div, which allows us to check whether the table is overflowing and adjust styles accordinglystickyprop added toEuiTableRowCell,EuiTableHeaderCell, andEuiTableFooterCellis marked as internal and beta. It's not intended to be used outside of the EuiBasicTable/EuiInMemoryTable implementation at this moment.Why are we making this change?
Part of the tables sweep fast-track efforts.
Screenshots #
When there's enough space to fit all columns:
When there isn't enough space to fit all columns - smaller viewports:
Impact to users
This is an opt-in feature. All existing functionality remains unchanged.
QA
General checklist
@defaultif default values are missing) and playground toggles