kgabryje commented on a change in pull request #15302:
URL: https://github.com/apache/superset/pull/15302#discussion_r656971367



##########
File path: 
superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/FilterScope.tsx
##########
@@ -56,11 +57,41 @@ const FilterScope: FC<FilterScopeProps> = ({
   scope,
   updateFormValues,
   chartId,
+  initiallyExcludedCharts,
 }) => {
-  const initialScope = scope || getDefaultScopeValue(chartId);
-  const initialScoping = isScopingAll(initialScope, chartId)
-    ? Scoping.all
-    : Scoping.specific;
+  const [initialScope] = useState(
+    scope || getDefaultScopeValue(chartId, initiallyExcludedCharts),
+  );
+  const [initialScoping] = useState(
+    isScopingAll(initialScope, chartId) ? Scoping.all : Scoping.specific,
+  );

Review comment:
       Totally agree, I feel like I spend more time trying to wrap my head 
around difference between those 2 than actual developing. I'll change that in 
this PR




-- 
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.

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



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

Reply via email to