mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
fix: New time range filter initially show advance section (#15889)
This commit is contained in:
parent
fb5dce07b7
commit
16a26bac35
@ -585,6 +585,10 @@ const FiltersConfigForm = (
|
|||||||
|
|
||||||
const defaultToFirstItem = formFilter?.controlValues?.defaultToFirstItem;
|
const defaultToFirstItem = formFilter?.controlValues?.defaultToFirstItem;
|
||||||
|
|
||||||
|
const hasAdvancedSection =
|
||||||
|
formFilter?.filterType === 'filter_select' ||
|
||||||
|
formFilter?.filterType === 'filter_range';
|
||||||
|
|
||||||
const preFilterValidator = () => {
|
const preFilterValidator = () => {
|
||||||
if (hasTimeRange || hasAdhoc) {
|
if (hasTimeRange || hasAdhoc) {
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
@ -847,7 +851,7 @@ const FiltersConfigForm = (
|
|||||||
.filter(key => BASIC_CONTROL_ITEMS.includes(key))
|
.filter(key => BASIC_CONTROL_ITEMS.includes(key))
|
||||||
.map(key => controlItems[key].element)}
|
.map(key => controlItems[key].element)}
|
||||||
</Collapse.Panel>
|
</Collapse.Panel>
|
||||||
{((hasDataset && hasAdditionalFilters) || hasMetrics) && (
|
{hasAdvancedSection && (
|
||||||
<Collapse.Panel
|
<Collapse.Panel
|
||||||
forceRender
|
forceRender
|
||||||
header={FilterPanels.advanced.name}
|
header={FilterPanels.advanced.name}
|
||||||
|
Loading…
Reference in New Issue
Block a user