Fix enterprise add-ons dropdown to remain visible while scrolling #7279
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@ChetanFTW
Description:
This PR improves the usability of the Enterprise Add-ons dropdown on the pricing page by implementing a floating dropdown that remains visible while scrolling.
Problem:
The original implementation used a standard Select component with position: sticky, which did not work due to layout constraints from parent containers. Users had to scroll back up to view their dropdown selection.
Solution:
Replaced the Select component with a TextField trigger and Menu component using position: fixed. The dropdown now:
Calculates its position dynamically using getBoundingClientRect()
Stays fixed on screen while the page scrolls
Maintains proper alignment with the input field
Updates position on window resize
Closes on outside click and Escape key
Preserves keyboard accessibility
Technical Implementation:
Added useRef to track trigger element position
Implemented position calculation with getBoundingClientRect()
Render Menu with position: fixed and dynamic top/left coordinates
Added event listeners for window resize and keyboard events
fix_enterpriseaddons_floating_dropdown.mp4
Maintained existing styling and responsive behavior
Testing:
✅ Dropdown stays visible while scrolling
✅ Responsive and accessible
✅ No console errors
✅ Proper keyboard navigation (Tab, Enter, Escape)