This is an automated email from the ASF dual-hosted git repository.

amitmiran pushed a commit to branch 1.2
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 05f00e211557c8a9a2259ddbf184da543ad6588d
Author: Ville Brofeldt <[email protected]>
AuthorDate: Fri Apr 23 19:29:51 2021 +0300

    feat(native-filters): add tooltip to control values (#14312)
    
    (cherry picked from commit 2b57ebaffdf4d59bf0bfcf930996df73762596db)
---
 .../FiltersConfigModal/FiltersConfigForm/ControlItems.tsx  | 14 ++++++++++++--
 .../src/filters/components/Select/controlPanel.ts          |  2 +-
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git 
a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/ControlItems.tsx
 
b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/ControlItems.tsx
index 7deee0d..48c074c 100644
--- 
a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/ControlItems.tsx
+++ 
b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/ControlItems.tsx
@@ -16,7 +16,10 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import { CustomControlItem } from '@superset-ui/chart-controls';
+import {
+  CustomControlItem,
+  InfoTooltipWithTrigger,
+} from '@superset-ui/chart-controls';
 import React, { FC } from 'react';
 import { Checkbox } from 'src/common/components';
 import { FormInstance } from 'antd/lib/form';
@@ -77,7 +80,14 @@ const ControlItems: FC<ControlItemsProps> = ({
                 forceUpdate();
               }}
             >
-              {controlItem.config.label}
+              {controlItem.config.label}{' '}
+              {controlItem.config.description && (
+                <InfoTooltipWithTrigger
+                  placement="top"
+                  label={controlItem.config.name}
+                  tooltip={controlItem.config.description}
+                />
+              )}
             </Checkbox>
           </StyledCheckboxFormItem>
         ))}
diff --git a/superset-frontend/src/filters/components/Select/controlPanel.ts 
b/superset-frontend/src/filters/components/Select/controlPanel.ts
index c4a560b..c41283d 100644
--- a/superset-frontend/src/filters/components/Select/controlPanel.ts
+++ b/superset-frontend/src/filters/components/Select/controlPanel.ts
@@ -75,7 +75,7 @@ const config: ControlPanelConfig = {
               default: enableEmptyFilter,
               renderTrigger: true,
               description: t(
-                'When selection is empty, should an always false filter event 
be emitted',
+                'When selection is empty, an always false filter event be 
emitted',
               ),
             },
           },

Reply via email to