superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From christ...@apache.org
Subject [incubator-superset] branch master updated: feat: add header tooltip (#7556)
Date Mon, 20 May 2019 19:04:52 GMT
This is an automated email from the ASF dual-hosted git repository.

christine pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new c79077d  feat: add header tooltip (#7556)
c79077d is described below

commit c79077d85d844d5c4c5d2ff648b43593aa32b6ae
Author: Kim Truong <47833996+khtruong@users.noreply.github.com>
AuthorDate: Mon May 20 12:04:42 2019 -0700

    feat: add header tooltip (#7556)
    
    * feat: add header tooltip (#7531)
---
 .../src/components/FilterableTable/FilterableTable.jsx    | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/superset/assets/src/components/FilterableTable/FilterableTable.jsx b/superset/assets/src/components/FilterableTable/FilterableTable.jsx
index 3ef03ba..702f2b9 100644
--- a/superset/assets/src/components/FilterableTable/FilterableTable.jsx
+++ b/superset/assets/src/components/FilterableTable/FilterableTable.jsx
@@ -27,6 +27,7 @@ import {
   SortIndicator,
 } from 'react-virtualized';
 import { getTextDimension } from '@superset-ui/dimension';
+import TooltipWrapper from '../TooltipWrapper';
 
 function getTextWidth(text, font = '12px Roboto') {
   return getTextDimension({ text, style: { font } }).width;
@@ -138,12 +139,14 @@ export default class FilterableTable extends PureComponent {
 
   headerRenderer({ dataKey, label, sortBy, sortDirection }) {
     return (
-      <div className="header-style">
-        {label}
-        {sortBy === dataKey &&
-          <SortIndicator sortDirection={sortDirection} />
-        }
-      </div>
+      <TooltipWrapper label="header" tooltip={label}>
+        <div className="header-style">
+          {label}
+          {sortBy === dataKey &&
+            <SortIndicator sortDirection={sortDirection} />
+          }
+        </div>
+      </TooltipWrapper>
     );
   }
 


Mime
View raw message