Dropdowns Update: Viewport detection/positioning
Purpose: Allow dropdowns to reposition intelligently based on viewport/window.
Possible sources for reference:
https://coreui.io/docs/components/bootstrap/dropdowns/#overview https://popper.js.org/ If there isn't enough room for the dropdown menu to display in the position it's supposed to, then it will automatically move to the opposite position. Example: down position will move to the up position when there isn't enough space below the button.
Note: Popper is now implemented on the React Magma tooltip component
Here's a list of the components that need this functionality added to them:
- Combobox
- Date picker
- Dropdown
- Select
Reference:
PR with Floating UI https://stash.cengage.com/projects/TRUST/repos/fx-ui/pull-requests/1537/diff#src%2Fcomponents%2Froutes%2FSearch%2Fcomponents%2FFilterDropdown.tsx
Confirmed the changes behave as expected for:
- Dropdown ✅
- Combobox ✅
- Select ✅
- DatePicker ✅