diff --git a/CHANGELOG.md b/CHANGELOG.md index 4df004290f..a25828c105 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -407,6 +407,7 @@ - Adjust background color of OuiToolTip in `next` theme ([#1004](https://github.com/opensearch-project/oui/pull/1004)) - Add new `middle-out` order prop option to `OuiPaletteColorBlind` ([#856](https://github.com/opensearch-project/oui/pull/856)) - Add new icons for OpenSearch Dashboards v2.10.0 ([#1014](https://github.com/opensearch-project/oui/pull/1014)) +- Add Tooltip to DataGrid header cell ([[#809](https://github.com/opensearch-project/oui/issues/809)]) ### 🐛 Bug Fixes diff --git a/src/components/datagrid/__snapshots__/data_grid.test.tsx.snap b/src/components/datagrid/__snapshots__/data_grid.test.tsx.snap index bb537ef767..334040e439 100644 --- a/src/components/datagrid/__snapshots__/data_grid.test.tsx.snap +++ b/src/components/datagrid/__snapshots__/data_grid.test.tsx.snap @@ -1051,82 +1051,90 @@ Array [ data-test-subj="dataGridHeader" role="row" > -
-
+
- +
+ A +
+ + +
-
-
+
-
+
- +
+ B +
+ + +
-
+
-
-
+
- +
+ A +
+ + +
-
-
+
-
+
- +
+ B +
+ + +
-
+
-
-
+
- +
+ Column A +
+ + +
-
-
+
-
+
- + + +
-
+
-
-
+
- +
+ A +
+ + +
-
-
+
-
+
- +
+ B +
+ + +
-
+
- {column.isResizable !== false && width != null ? ( - - ) : null} + +
+ {column.isResizable !== false && width != null ? ( + + ) : null} - {sorting && sorting.columns.length >= 2 && ( - -
{sortString}
-
- )} - {!showColumnActions ? ( - <> - {sortingArrow} -
- {display || displayAsText || id} -
- - ) : ( - - setIsPopoverOpen((isPopoverOpen) => !isPopoverOpen) - }> - {sortingArrow} -
- {display || displayAsText || id} -
- = 2 && ( + +
{sortString}
+
+ )} + {!showColumnActions ? ( + <> + {sortingArrow} +
+ {display || displayAsText || id} +
+ + ) : ( + + setIsPopoverOpen((isPopoverOpen) => !isPopoverOpen) + }> + {sortingArrow} +
+ {display || displayAsText || id} +
+ + + } + isOpen={isPopoverOpen} + closePopover={() => setIsPopoverOpen(false)}> +
+ - - } - isOpen={isPopoverOpen} - closePopover={() => setIsPopoverOpen(false)}> -
- -
- - )} -
+
+ + )} +
+ ); };