sadpandajoe commented on code in PR #40297:
URL: https://github.com/apache/superset/pull/40297#discussion_r3828762183
##########
superset-frontend/src/filters/components/Select/SelectFilterPlugin.tsx:
##########
@@ -93,6 +100,26 @@ function reducer(draft: DataMask, action: DataMaskAction) {
}
}
+export const getSelectPopupContainer = (
+ appSection: AppSection,
+ showOverflow: boolean,
+ parentRef?: RefObject<any>,
+) => {
+ if (showOverflow) {
+ return () => (parentRef?.current as HTMLElement) || document.body;
+ }
+
+ if (
+ appSection === AppSection.Dashboard ||
+ appSection === AppSection.FilterBar
+ ) {
+ return () => document.body;
+ }
Review Comment:
Agreed—the dashboard path never supplies `appSection`, so this branch falls
back to the trigger parent and the reported overlap remains. Could the
dashboard entrypoint pass its section through to `SuperChart` and cover that
integration path?
##########
superset-frontend/src/filters/components/Select/SelectFilterPlugin.tsx:
##########
@@ -595,12 +622,11 @@ export default function PluginFilterSelect(props:
PluginFilterSelectProps) {
allowSelectAll={!searchAllOptions}
value={multiSelect ? filterState.value || [] : filterState.value}
disabled={isDisabled}
- getPopupContainer={
- showOverflow
- ? () => (parentRef?.current as HTMLElement) || document.body
- : (trigger: HTMLElement) =>
- (trigger?.parentNode as HTMLElement) || document.body
- }
+ getPopupContainer={getSelectPopupContainer(
+ appSection,
+ showOverflow,
+ parentRef,
+ )}
Review Comment:
Agreed—the actual overflow state is only carried in `displaySettings`, while
this helper reads an unset `showOverflow`; dropdowns in More filters will
therefore be reparented to `document.body`. Could this use the propagated
overflow state and add an overflowed-filter regression test?
--
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]