BansonVuong opened a new pull request, #40297:
URL: https://github.com/apache/superset/pull/40297
### SUMMARY
The Value filter dropdown in the dashboard native filter bar was mounting
its popup to the trigger's parent node. On smaller viewports or with elevated
browser zoom the constrained parent prevented antd's overflow logic from
flipping the menu, so the dropdown rendered over the input field.
This PR routes Dashboard/FilterBar Select filters through a new shared
`getSelectPopupContainer` helper that mounts to `document.body` when the filter
is not overflowed. That lets `DROPDOWN_ALIGN_BOTTOM`'s `overflow: { adjustY: 1
}` position the menu against the viewport — so the popup flips above the input
when there is no space below. Overflowed filters (which render inside the
filter-bar popover) and the filter-config modal keep their existing container
behavior to avoid regressing those positioning contexts.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
<!-- TODO: capture short clip of small-viewport repro before/after -->
### TESTING INSTRUCTIONS
1. Open the example Sales Dashboard.
2. Reduce the viewport height (or increase browser zoom) until there isn't
enough room below the Value filter for a normal dropdown.
3. Click a Value filter.
4. Confirm the dropdown flips above the input instead of obscuring it.
5. Verify these still work as before:
- Overflowed native filters (filter bar with many filters in horizontal
mode).
- Filter-config modal value selects.
- Non-dashboard Select usage of this plugin.
Unit tests: `npm test -- SelectFilterPlugin.test` (36/36 pass, including 3
new tests for the helper).
### ADDITIONAL INFORMATION
- [x] Has associated issue: #34135
- [ ] Required feature flags:
- [x] Changes UI
- [ ] Includes DB Migration
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
--
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]