Skip to content

Commit

Permalink
[EuiDataGrid] Custom column headers (#2421)
Browse files Browse the repository at this point in the history
* Allow custom ReactNode for column header display

* Allow navigation into grid headers if any are interactive

* Properly wrap cell focus and use [enter], [f2] to interact

* Corrected header cell focus-state on blurring, [escape]. and single interactives

* Corrected header cell focus-state on blurring, [escape]. and single interactives

* When datagrid header is interactive, default its tabstop to the first header cell

* EuiDataGridHeaderCell warns about multiple interactive elements

* fix focus, example and screenreader stuffs, looks like tests pass

* simplifying screen reader read out
  • Loading branch information
chandlerprall authored Oct 16, 2019
1 parent ac1a374 commit 33b7080
Show file tree
Hide file tree
Showing 8 changed files with 949 additions and 102 deletions.
19 changes: 19 additions & 0 deletions src-docs/src/views/datagrid/datagrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,34 @@ import {
EuiLink,
EuiPopover,
EuiSpacer,
EuiFlexGroup,
EuiFlexItem,
} from '../../../../src/components/';
import { EuiRadioGroup } from '../../../../src/components/form/radio';
import { EuiButtonIcon } from '../../../../src/components/button/button_icon';

const columns = [
{
id: 'name',
},
{
id: 'email',
display: (
// This is an example of an icon next to a title that still respects text truncate
<EuiFlexGroup gutterSize="xs">
<EuiFlexItem className="eui-textTruncate">
<div className="eui-textTruncate">email</div>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiButtonIcon
aria-label="Column header email"
iconType="gear"
color="text"
onClick={() => alert('Email Icon Clicked!')}
/>
</EuiFlexItem>
</EuiFlexGroup>
),
},
{
id: 'location',
Expand Down
Loading

0 comments on commit 33b7080

Please sign in to comment.