Skip to content

Commit

Permalink
fix: New time range filter initially show advance section (apache#15889)
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-s-molina authored and cccs-RyanS committed Dec 17, 2021
1 parent a986eb9 commit 0362df1
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -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();
Expand Down Expand Up @@ -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}
Expand Down

0 comments on commit 0362df1

Please sign in to comment.