Skip to content

Fix mobile dropdown overflow and alignment issue

Damanagari Sathwika requested to merge fix/dropdown-alignment into develop

Overview

This MR fixes the dropdown misalignment issue in mobile view across admin pages where dropdown menus were rendering outside the viewport (left side), causing poor user experience.


What does this MR do and why?

This MR resolves a UI bug where dropdown components (Specialization, Status, Search By, Camp selection) were not properly aligned with their trigger elements in mobile view.

  • Dropdowns were shifting to the left and going outside the screen
  • Users could not properly see or interact with options
  • UI appeared broken on mobile devices

Fix ensures dropdowns are correctly anchored to their trigger elements and remain within screen bounds.


Changes Made

  • Fixed dropdown alignment in:

    • Queue Management page
    • Manage Medicines page
    • Patient Profiles page
    • Camp Analytics page
  • Ensured dropdown opens directly below input/select

  • Prevented overflow outside viewport in mobile view

  • Maintained existing functionality and desktop behavior


Technical Details

  • Root cause: Dropdown was positioned relative to the wrong container
  • Fix: Corrected positioning logic so dropdown aligns with trigger element
  • Removed unintended left offset in mobile view

Type of Change

  • 🐛 Bug fix
  • 🎨 UI/UX improvement

Related Issues / References

#308 (closed)


Screenshots

Before

Dropdown shifted left Partially hidden
Screenshot_from_2026-04-11_16-35-56

After

Properly aligned dropdown Fully visible
Screenshot_from_2026-04-12_10-03-33


How to Validate

  1. Run project:

    bun dev
  2. Open mobile view (320px–400px)

  3. Test dropdowns in:

    • Queue Management
    • Manage Medicines
    • Patient Profiles
    • Camp Analytics
  4. Verify:

    • Proper alignment
    • No overflow
    • Fully visible

Testing Done

  • Manual testing completed

Result

  • Dropdown opens below trigger
  • No left overflow
  • Fully visible on mobile
  • Desktop unchanged

Merge request reports

Loading