korbit-ai[bot] commented on code in PR #34137:
URL: https://github.com/apache/superset/pull/34137#discussion_r2204060722


##########
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:
   I see - defaultDataMask is indeed the correct choice here since this handles 
the initial filter loading state. Thanks for the clarification.



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