You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/02/15 15:09:04 UTC

[GitHub] [superset] geido commented on a change in pull request #18695: fix(native-filter): fix required filters of a dashboard won't load properly

geido commented on a change in pull request #18695:
URL: https://github.com/apache/superset/pull/18695#discussion_r806935506



##########
File path: superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx
##########
@@ -238,6 +238,9 @@ const FilterBar: React.FC<FiltersBarProps> = ({
         const currentTargets = currentFilter.targets;
         const currentDataMask = currentFilter.defaultDataMask;
         const previousFilter = previousFilters?.[currentFilter.id];
+        if (!previousFilter) {

Review comment:
       Since this is a pre-condition would you mind moving it at the top of the loop just to make the code more readable. Thank you!




-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org