Skip to content

[EuiDataGrid] Stabilize column header layout for actions control#9637

Draft
flash1293 wants to merge 1 commit intoelastic:mainfrom
flash1293:fix/9104-datagrid-header-column-actions-layout
Draft

[EuiDataGrid] Stabilize column header layout for actions control#9637
flash1293 wants to merge 1 commit intoelastic:mainfrom
flash1293:fix/9104-datagrid-header-column-actions-layout

Conversation

@flash1293
Copy link
Copy Markdown
Contributor

Summary

Adds two optional fields on EuiDataGridStyle (via the gridStyle prop on EuiDataGrid) so apps can avoid the column header height / flex layout shift when the per-column actions (⋮) control appears on hover:

  • headerColumnActionsVisibility: 'hover' (default) or 'always' — keeps the actions affordance visible so wrapped header text does not reflow on hover.
  • headerColumnActionsDisplay: 'inline' (default) or 'overlay' — positions the actions anchor absolutely at the inline end of the header cell so it does not participate in flex layout; combined with a steady header gap in overlay mode, hover no longer toggles spacing.

Defaults are wired through startingStyles so existing grids behave unchanged.

Related

Fixes #9104

Testing

  • yarn test-unit --changedSince main (pre-push)
  • Targeted unit tests for header cell and display selector

Made with Cursor

Introduce headerColumnActionsVisibility (hover | always) and
headerColumnActionsDisplay (inline | overlay) on EuiDataGridStyle so
consumers can avoid header height and flex layout shift when the
column actions control appears.

Refs elastic#9104

Co-authored-by: Cursor <cursoragent@cursor.com>
@elasticmachine
Copy link
Copy Markdown
Collaborator

💚 Build Succeeded

@elasticmachine
Copy link
Copy Markdown
Collaborator

💚 Build Succeeded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[EuiDataGrid] Avoid changing column header height on hover

2 participants