Skip to content

Commit

Permalink
Add headerRow to EuiBasicTable (#2802)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreadelrio authored Jan 31, 2020
1 parent 781667a commit 74ebe2b
Show file tree
Hide file tree
Showing 9 changed files with 112 additions and 17 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- Added `tableCaption` prop to `EuiBasicTable` and improved the default one ([#2782](https://github.com/elastic/eui/pull/2782))
- Changed SASS comments to non-compiled comments in invisibles files ([#2807](https://github.com/elastic/eui/pull/2807))
- Added `rowHeader` prop to `EuiBasicTable` to allow consumers to set the identifying cell in a row ([#2802](https://github.com/elastic/eui/pull/2802))

## [`18.3.0`](https://github.com/elastic/eui/tree/v18.3.0)

Expand Down
1 change: 1 addition & 0 deletions src-docs/src/views/tables/basic/basic.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ export const Table = () => {
return (
<EuiBasicTable
items={items}
rowHeader="firstName"
columns={columns}
rowProps={getRowProps}
cellProps={getCellProps}
Expand Down
6 changes: 6 additions & 0 deletions src-docs/src/views/tables/basic/props_info.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ export const propsInfo = {
required: false,
type: { name: '(criteria: #Criteria) => void' },
},
rowHeader: {
description:
'Indicates which column should be used as the identifying cell in each row. Should match a "field" prop in FieldDataColumn',
required: false,
type: { name: 'string' },
},
tableCaption: {
description:
'Describes the content of the table. If not specified, the caption will be "This table contains {itemCount} rows."',
Expand Down
1 change: 1 addition & 0 deletions src-docs/src/views/tables/selection/selection.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ export class Table extends Component {
isSelectable={true}
selection={selection}
onChange={this.onTableChange}
rowHeader="firstName"
/>
</Fragment>
);
Expand Down
Loading

0 comments on commit 74ebe2b

Please sign in to comment.