Vitor-Avila commented on code in PR #33834:
URL: https://github.com/apache/superset/pull/33834#discussion_r2162304313
##########
superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx:
##########
@@ -256,25 +256,17 @@ const FilterBar: FC<FiltersBarProps> = ({
}, [dataMaskSelected, dispatch]);
const handleClearAll = useCallback(() => {
- const clearDataMaskIds: string[] = [];
- let dispatchAllowed = false;
filtersInScope.filter(isNativeFilter).forEach(filter => {
const { id } = filter;
if (dataMaskSelected[id]) {
- if (filter.controlValues?.enableEmptyFilter) {
- dispatchAllowed = false;
- }
- clearDataMaskIds.push(id);
setDataMaskSelected(draft => {
if (draft[id].filterState?.value !== undefined) {
draft[id].filterState!.value = undefined;
}
+ draft[id].extraFormData = {};
});
}
});
- if (dispatchAllowed) {
- clearDataMaskIds.forEach(id => dispatch(clearDataMask(id)));
- }
Review Comment:
From more recent conversations, it might make more sense to actually
introduce a new button (Like **Reset**) that would restore all default values
and then automatically apply.
--
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]