Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EuiDataGrid] Allow custom class name for EuiDataGridHeaderCell #5106

Closed
walterra opened this issue Aug 27, 2021 · 3 comments · Fixed by #6609
Closed

[EuiDataGrid] Allow custom class name for EuiDataGridHeaderCell #5106

walterra opened this issue Aug 27, 2021 · 3 comments · Fixed by #6609
Assignees

Comments

@walterra
Copy link
Contributor

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.

@github-actions
Copy link

👋 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.

@JasonStoltz
Copy link
Member

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

@cee-chen
Copy link
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants