Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(native-filters): add tooltip to control values #14312

Merged
merged 1 commit into from
Apr 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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