Skip to content

Conversation

@GaneshPatil7517
Copy link

@GaneshPatil7517 GaneshPatil7517 commented Dec 23, 2025

@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)

Signed-off-by: Ganesh Patil <7030871503ganeshpatil@gmail.com>
@l5io
Copy link
Contributor

l5io commented Dec 23, 2025

🚀 Preview for commit 7986d66 at: https://694a7100f6dac13605a9cb5e--layer5.netlify.app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants