Skip to content

Commit

Permalink
feat(native-filters): add tooltip to control values (apache#14312)
Browse files Browse the repository at this point in the history
  • Loading branch information
villebro authored Apr 23, 2021
1 parent e2f73b2 commit 61277a9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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>
))}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
),
},
},
Expand Down

0 comments on commit 61277a9

Please sign in to comment.