ObservabilityTeam commented on code in PR #34137:
URL: https://github.com/apache/superset/pull/34137#discussion_r2204059663


##########
superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterValue.tsx:
##########
@@ -155,6 +157,37 @@
       dashboardId,
     });
     const filterOwnState = filter.dataMask?.ownState || {};
+    if (filter?.cascadeParentIds?.length) {
+      // check if it is a child filter
+
+      let selectedParentFilterValueCounts = 0;
+
+      filter?.cascadeParentIds?.forEach(pId => {
+        if (
+          allFilters[pId]?.controlValues?.defaultToFirstItem ||
+          allFilters[pId]?.defaultDataMask?.extraFormData?.filters ||
+          allFilters[pId]?.defaultDataMask?.extraFormData?.time_range
+        ) {
+          selectedParentFilterValueCounts +=
+            allFilters[pId]?.defaultDataMask?.extraFormData?.filters?.length 
?? 1;
+        }
+      });

Review Comment:
   Incorrect. The "defaultDataMask" is being used to load the filters on first 
dashboard render. 



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

Reply via email to