Skip to content

[EuiDataGrid] Allow custom class name for EuiDataGridHeaderCell #5106

Closed

Description

@walterra

This relates to this Kibana issue: elastic/kibana#110053

With a higher header cell, the sorting icon will still be vertically aligned which we'd like to change in this case. Right now we have to override EUI classes which we'd like to avoid.

Activity

  1. github-actions commented on Feb 23, 2022

    @github-actions

    👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.

  2. added
    stale-issue
    on Feb 23, 2022
  3. added and removed
    stale-issue
    on Feb 28, 2022
  4. JasonStoltz commented on Feb 6, 2023

    @JasonStoltz
    Contributor

    @cee-chen Can you link your current work here?

  5. self-assigned this
    on Feb 6, 2023
  6. cee-chen commented on Feb 16, 2023

    @cee-chen
    Contributor

    Once #6609 lands, you'll be able to accomplish this with the displayHeaderCellProps property in columns:

    // Example css
    .yourClass {
      vertical-align: top; // or whatever
    }
    
    // Example column
    const columns = [
      {
        id: 'someColumn',
        display: <>Column <EuiIcon type="dot" /></>,
        displayHeaderCellProps: { className: 'yourClass' },
        // etc.
      },
    ];
    
    // Example data grid
    <EuiDataGrid
      columns={columns}
      // etc.
    />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions