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