Skip to content

Commit

Permalink
Fixed description prop in EuiTable (#4754)
Browse files Browse the repository at this point in the history
Co-authored-by: Michail Yasonik <michail.yasonik@elastic.co>
  • Loading branch information
hetanthakkar and Michail Yasonik authored Apr 29, 2021
1 parent 45d142b commit 0a3badd
Show file tree
Hide file tree
Showing 7 changed files with 229 additions and 137 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
**Bug fixes**

- Fixed `initialFocus` prop functionality in `EuiPopover` ([#4768](https://github.com/elastic/eui/pull/4768))
- Fixed `description` prop in `EuiTable`([#4754](https://github.com/elastic/eui/pull/4754))

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

Expand Down
74 changes: 64 additions & 10 deletions src/components/basic_table/__snapshots__/basic_table.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ exports[`EuiBasicTable cellProps renders cells with custom props from a callback
<EuiTableHeaderCell
align="left"
data-test-subj="tableHeaderCell_name_0"
description="description"
key="_data_h_name_0"
>
Name
Expand Down Expand Up @@ -171,6 +172,7 @@ exports[`EuiBasicTable cellProps renders rows with custom props from an object 1
<EuiTableHeaderCell
align="left"
data-test-subj="tableHeaderCell_name_0"
description="description"
key="_data_h_name_0"
>
Name
Expand Down Expand Up @@ -297,6 +299,7 @@ exports[`EuiBasicTable empty is rendered 1`] = `
<EuiTableHeaderCell
align="left"
data-test-subj="tableHeaderCell_name_0"
description="description"
key="_data_h_name_0"
>
Name
Expand Down Expand Up @@ -365,6 +368,7 @@ exports[`EuiBasicTable empty renders a node as a custom message 1`] = `
<EuiTableHeaderCell
align="left"
data-test-subj="tableHeaderCell_name_0"
description="description"
key="_data_h_name_0"
>
Name
Expand Down Expand Up @@ -441,6 +445,7 @@ exports[`EuiBasicTable empty renders a string as a custom message 1`] = `
<EuiTableHeaderCell
align="left"
data-test-subj="tableHeaderCell_name_0"
description="description"
key="_data_h_name_0"
>
Name
Expand Down Expand Up @@ -509,20 +514,23 @@ exports[`EuiBasicTable footers do not render without a column footer definition
<EuiTableHeaderCell
align="left"
data-test-subj="tableHeaderCell_name_0"
description="your name"
key="_data_h_name_0"
>
Name
</EuiTableHeaderCell>
<EuiTableHeaderCell
align="left"
data-test-subj="tableHeaderCell_id_1"
description="your id"
key="_data_h_id_1"
>
ID
</EuiTableHeaderCell>
<EuiTableHeaderCell
align="left"
data-test-subj="tableHeaderCell_age_2"
description="your age"
key="_data_h_age_2"
>
Age
Expand Down Expand Up @@ -756,6 +764,7 @@ exports[`EuiBasicTable footers render with pagination, selection, sorting, and f
<EuiTableHeaderCell
align="left"
data-test-subj="tableHeaderCell_name_0"
description="your name"
isSortAscending={true}
isSorted={true}
key="_data_h_name_0"
Expand All @@ -766,13 +775,15 @@ exports[`EuiBasicTable footers render with pagination, selection, sorting, and f
<EuiTableHeaderCell
align="left"
data-test-subj="tableHeaderCell_id_1"
description="your id"
key="_data_h_id_1"
>
ID
</EuiTableHeaderCell>
<EuiTableHeaderCell
align="left"
data-test-subj="tableHeaderCell_age_2"
description="your age"
key="_data_h_age_2"
>
Age
Expand Down Expand Up @@ -1045,6 +1056,7 @@ exports[`EuiBasicTable itemIdToExpandedRowMap renders an expanded row 1`] = `
<EuiTableHeaderCell
align="left"
data-test-subj="tableHeaderCell_name_0"
description="description"
key="_data_h_name_0"
>
Name
Expand Down Expand Up @@ -1174,6 +1186,7 @@ exports[`EuiBasicTable rowProps renders rows with custom props from a callback 1
<EuiTableHeaderCell
align="left"
data-test-subj="tableHeaderCell_name_0"
description="description"
key="_data_h_name_0"
>
Name
Expand Down Expand Up @@ -1304,6 +1317,7 @@ exports[`EuiBasicTable rowProps renders rows with custom props from an object 1`
<EuiTableHeaderCell
align="left"
data-test-subj="tableHeaderCell_name_0"
description="description"
key="_data_h_name_0"
>
Name
Expand Down Expand Up @@ -1581,6 +1595,7 @@ exports[`EuiBasicTable with initial selection 1`] = `
<EuiTableHeaderCell
align="left"
data-test-subj="tableHeaderCell_name_0"
description="description"
key="_data_h_name_0"
>
<th
Expand All @@ -1594,18 +1609,42 @@ exports[`EuiBasicTable with initial selection 1`] = `
}
}
>
<div
<CellContents
className="euiTableCellContent"
description="description"
showSortMsg={false}
>
<EuiInnerText>
<span
className="euiTableCellContent__text"
title="Name"
>
Name
</span>
</EuiInnerText>
</div>
<span
className="euiTableCellContent"
>
<EuiInnerText>
<EuiI18n
default="{innerText}; {description}"
token="euiTableHeaderCell.titleTextWithDesc"
values={
Object {
"description": "description",
"innerText": "Name",
}
}
>
<span
className="euiTableCellContent__text"
title="Name; description"
>
Name
</span>
</EuiI18n>
</EuiInnerText>
<EuiScreenReaderOnly>
<span
className="euiScreenReaderOnly"
>
description
</span>
</EuiScreenReaderOnly>
</span>
</CellContents>
</th>
</EuiTableHeaderCell>
</tr>
Expand Down Expand Up @@ -1950,6 +1989,7 @@ exports[`EuiBasicTable with multiple record actions with custom availability 1`]
<EuiTableHeaderCell
align="left"
data-test-subj="tableHeaderCell_name_0"
description="description"
key="_data_h_name_0"
>
Name
Expand Down Expand Up @@ -2262,6 +2302,7 @@ exports[`EuiBasicTable with pagination - 2nd page 1`] = `
<EuiTableHeaderCell
align="left"
data-test-subj="tableHeaderCell_name_0"
description="description"
key="_data_h_name_0"
>
Name
Expand Down Expand Up @@ -2374,6 +2415,7 @@ exports[`EuiBasicTable with pagination 1`] = `
<EuiTableHeaderCell
align="left"
data-test-subj="tableHeaderCell_name_0"
description="description"
key="_data_h_name_0"
>
Name
Expand Down Expand Up @@ -2504,6 +2546,7 @@ exports[`EuiBasicTable with pagination and error 1`] = `
<EuiTableHeaderCell
align="left"
data-test-subj="tableHeaderCell_name_0"
description="description"
key="_data_h_name_0"
>
Name
Expand Down Expand Up @@ -2597,6 +2640,7 @@ exports[`EuiBasicTable with pagination and selection 1`] = `
<EuiTableHeaderCell
align="left"
data-test-subj="tableHeaderCell_name_0"
description="description"
key="_data_h_name_0"
>
Name
Expand Down Expand Up @@ -2760,6 +2804,7 @@ exports[`EuiBasicTable with pagination, hiding the per page options 1`] = `
<EuiTableHeaderCell
align="left"
data-test-subj="tableHeaderCell_name_0"
description="description"
key="_data_h_name_0"
>
Name
Expand Down Expand Up @@ -2922,6 +2967,7 @@ exports[`EuiBasicTable with pagination, selection and sorting 1`] = `
<EuiTableHeaderCell
align="left"
data-test-subj="tableHeaderCell_name_0"
description="description"
isSortAscending={true}
isSorted={true}
key="_data_h_name_0"
Expand Down Expand Up @@ -3119,6 +3165,7 @@ exports[`EuiBasicTable with pagination, selection, sorting and a single record a
<EuiTableHeaderCell
align="left"
data-test-subj="tableHeaderCell_name_0"
description="description"
isSortAscending={true}
isSorted={true}
key="_data_h_name_0"
Expand Down Expand Up @@ -3409,6 +3456,7 @@ exports[`EuiBasicTable with pagination, selection, sorting and column dataType 1
<EuiTableHeaderCell
align="right"
data-test-subj="tableHeaderCell_count_0"
description="description of count"
isSortAscending={true}
isSorted={true}
key="_data_h_count_0"
Expand Down Expand Up @@ -3606,6 +3654,7 @@ exports[`EuiBasicTable with pagination, selection, sorting and column renderer 1
<EuiTableHeaderCell
align="left"
data-test-subj="tableHeaderCell_name_0"
description="description"
isSortAscending={true}
isSorted={true}
key="_data_h_name_0"
Expand Down Expand Up @@ -3803,6 +3852,7 @@ exports[`EuiBasicTable with pagination, selection, sorting and multiple record a
<EuiTableHeaderCell
align="left"
data-test-subj="tableHeaderCell_name_0"
description="description"
isSortAscending={true}
isSorted={true}
key="_data_h_name_0"
Expand Down Expand Up @@ -4111,6 +4161,7 @@ exports[`EuiBasicTable with pagination, selection, sorting, column renderer and
<EuiTableHeaderCell
align="right"
data-test-subj="tableHeaderCell_count_0"
description="description of count"
isSortAscending={true}
isSorted={true}
key="_data_h_count_0"
Expand Down Expand Up @@ -4274,6 +4325,7 @@ exports[`EuiBasicTable with sortable columns and sorting disabled 1`] = `
<EuiTableHeaderCell
align="left"
data-test-subj="tableHeaderCell_name_0"
description="description"
key="_data_h_name_0"
>
Name
Expand Down Expand Up @@ -4403,6 +4455,7 @@ exports[`EuiBasicTable with sorting 1`] = `
<EuiTableHeaderCell
align="left"
data-test-subj="tableHeaderCell_name_0"
description="description"
isSortAscending={true}
isSorted={true}
key="_data_h_name_0"
Expand Down Expand Up @@ -4535,6 +4588,7 @@ exports[`EuiBasicTable with sorting enabled and enable all columns for sorting 1
<EuiTableHeaderCell
align="left"
data-test-subj="tableHeaderCell_name_0"
description="description"
isSortAscending={true}
isSorted={true}
key="_data_h_name_0"
Expand Down
Loading

0 comments on commit 0a3badd

Please sign in to comment.