rusackas commented on code in PR #44366:
URL: https://github.com/apache/superset/pull/44366#discussion_r4054904636


##########
superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx:
##########
@@ -471,9 +471,11 @@ const FiltersConfigForm = (
     formFilter?.filterType,
   );
 
-  const canDependOnOtherFilters = filterSupportsDependencies(
-    formFilter?.filterType,
-  );
+  // Use itemTypeField, not formFilter?.filterType directly: the latter can
+  // be undefined on the first render before the antd Form hydrates (see
+  // itemTypeField's own fallback chain above), which would otherwise hide
+  // this section for a filter type that does support cascade dependencies.
+  const canDependOnOtherFilters = filterSupportsDependencies(itemTypeField);

Review Comment:
   Added a case to `FiltersConfigModal.test.tsx` that opens a saved select 
filter with a cascade parent and checks the dependency control renders on first 
paint, no interaction needed.



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