sadpandajoe commented on code in PR #44366:
URL: https://github.com/apache/superset/pull/44366#discussion_r4075757824
##########
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:
Thanks—this assertion runs after the modal's mount effect force-updates the
form, so reverting the fallback can still hide the control in the initial
commit and then pass after hydration. Could we demonstrate that this test fails
on revert with a boundary that can observe the first commit, or document why
that is unobservable?
--
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]