sadpandajoe commented on code in PR #45604:
URL: https://github.com/apache/superset/pull/45604#discussion_r4354601348
##########
superset-frontend/packages/superset-ui-core/src/components/Select/Select.tsx:
##########
@@ -1003,7 +1003,7 @@ const Select = forwardRef(
getPopupContainer ||
((triggerNode: HTMLElement) =>
(triggerNode?.closest('.ant-modal-container') as HTMLElement) ||
- (triggerNode.parentNode as HTMLElement))
+ document.body)
Review Comment:
This fallback now ignores the fullscreen-aware `getPopupContainer` that
`ChartHolder` supplies through `AntdThemeProvider`, because an explicit
callback on the Select wins over the provider. In chart fullscreen, a Select
with no override (e.g. the AG Grid table's `SearchSelectDropdown` "Search by")
will portal its options to `document.body`, outside the fullscreen element, so
they won't be visible or clickable. Previously the `parentNode` fallback kept
them inside. Could the default defer to the provider's container (or keep
fullscreen containment) before falling back to `document.body`? The same
applies to `AsyncSelect`.
##########
superset-frontend/packages/superset-ui-core/src/components/Select/AsyncSelect.tsx:
##########
@@ -873,7 +873,7 @@ const AsyncSelect = forwardRef(
getPopupContainer ||
((triggerNode: HTMLElement) =>
(triggerNode?.closest('.ant-modal-container') as HTMLElement) ||
- (triggerNode.parentNode as HTMLElement))
+ document.body)
Review Comment:
Nothing in the PR exercises this default: the new GroupBy and color-scheme
tests all pass an explicit popup container, and `popup.closest('body')` would
also pass for an inline popup. Reverting this (or the `Select.tsx` twin) to
`triggerNode.parentNode` would bring the double scrollbar back with every test
green. Could you add a test, parameterized over `Select` and `AsyncSelect`,
that renders inside a non-modal scrollable wrapper with no `getPopupContainer`,
opens the dropdown, and asserts the popup's parent is `document.body` and not
inside the wrapper? `antdDomContract.test.tsx` already covers the modal side.
--
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]