mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
fix: Show cross filter option only when cross filter is enabled (#16391)
This commit is contained in:
parent
9a37ad1a1e
commit
575e7af859
@ -88,6 +88,7 @@ export interface SliceHeaderControlsProps {
|
|||||||
slice_name: string;
|
slice_name: string;
|
||||||
slice_id: number;
|
slice_id: number;
|
||||||
slice_description: string;
|
slice_description: string;
|
||||||
|
form_data?: { emit_filter?: boolean };
|
||||||
};
|
};
|
||||||
|
|
||||||
componentId: string;
|
componentId: string;
|
||||||
@ -229,6 +230,7 @@ class SliceHeaderControls extends React.PureComponent<
|
|||||||
value.behaviors?.includes(Behavior.INTERACTIVE_CHART),
|
value.behaviors?.includes(Behavior.INTERACTIVE_CHART),
|
||||||
)
|
)
|
||||||
.find(([key]) => key === slice.viz_type);
|
.find(([key]) => key === slice.viz_type);
|
||||||
|
const canEmitCrossFilter = slice.form_data?.emit_filter;
|
||||||
|
|
||||||
const cachedWhen = (cachedDttm || []).map(itemCachedDttm =>
|
const cachedWhen = (cachedDttm || []).map(itemCachedDttm =>
|
||||||
moment.utc(itemCachedDttm).fromNow(),
|
moment.utc(itemCachedDttm).fromNow(),
|
||||||
@ -335,7 +337,8 @@ class SliceHeaderControls extends React.PureComponent<
|
|||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
)}
|
)}
|
||||||
{isFeatureEnabled(FeatureFlag.DASHBOARD_CROSS_FILTERS) &&
|
{isFeatureEnabled(FeatureFlag.DASHBOARD_CROSS_FILTERS) &&
|
||||||
isCrossFilter && (
|
isCrossFilter &&
|
||||||
|
canEmitCrossFilter && (
|
||||||
<Menu.Item key={MENU_KEYS.CROSS_FILTER_SCOPING}>
|
<Menu.Item key={MENU_KEYS.CROSS_FILTER_SCOPING}>
|
||||||
{t('Cross-filter scoping')}
|
{t('Cross-filter scoping')}
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
|
Loading…
Reference in New Issue
Block a user