Skip to content

[EuiDataGrid] Columns popover should not only show ids #3421

@timroes

Description

@timroes

Currently the popover to control visibility of columns and reodering them always shows the id property of that column. I think it would make more sense to show the display of that column or introduce at least a mode to configure that.

The id of a column can be something very technical, that the user otherwise will never see and thus cannot make a connection to the column they are seeing. e.g. in Discover the id could be an underlaying field name while we allow someone to give the column a custom header. Now they would always see the custom name in the column (e.g. "Current Status"), but in the popover they would always see "internal.stats.state_i900", which I think is not a good idea.

I understand that display can be used to render really rich controls inside the column header, why it might make sense not to always show display in the popover, but I think we should do one of the following solutions:

  • Add a flag to the data grid, allowing to configure whether id or display should be shown, so consumers can set it to display when they know it's just used to render alternative names; or/and
  • Give column descriptions a new property like displayAsText, which can only return a string and will be used in that popover dialog, so you can have a rich JSX display for the column header and still have a display name for the columns popover.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions