geido commented on a change in pull request #16851:
URL: https://github.com/apache/superset/pull/16851#discussion_r716595309
##########
File path:
superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx
##########
@@ -550,15 +512,21 @@ const FiltersConfigForm = (
}));
const parentFilter = parentFilterOptions.find(
- ({ value }) => value === filterToEdit?.cascadeParentIds[0],
+ ({ value }) =>
+ value === formFilter?.parentFilter?.value ||
+ value === filterToEdit?.cascadeParentIds?.[0],
);
const hasParentFilter = !!parentFilter;
const hasPreFilter =
- !!filterToEdit?.adhoc_filters || !!filterToEdit?.time_range;
+ !!formFilter?.adhoc_filters ||
+ !!formFilter?.time_range ||
+ !!filterToEdit?.adhoc_filters?.length ||
+ !!filterToEdit?.time_range;
Review comment:
Thanks for your feedback! It appears that when the form doesn't have any
filters it will just return undefined, reason why I am only checking for that
here
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]