superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject [incubator-superset] branch lyft-develop updated: feat: add header tooltip (#7531)
Date Thu, 16 May 2019 23:04:53 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/lyft-develop by this push:
     new 0acbb04  feat: add header tooltip (#7531)
0acbb04 is described below

commit 0acbb04d3836f3bc1086e514541a6d2fe6150212
Author: Kim Truong <47833996+khtruong@users.noreply.github.com>
AuthorDate: Thu May 16 16:04:46 2019 -0700

    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