Skip to content

Fix - multiple dropdown open state and outside click handling#1514

Open
RohitChavan16 wants to merge 1 commit into
mdazfar2:mainfrom
RohitChavan16:fix/resources-dropdown-behavior
Open

Fix - multiple dropdown open state and outside click handling#1514
RohitChavan16 wants to merge 1 commit into
mdazfar2:mainfrom
RohitChavan16:fix/resources-dropdown-behavior

Conversation

@RohitChavan16
Copy link
Copy Markdown

Description

Fixed dropdown behavior issues on the Resources page.

Issues Resolved

  • Dropdowns remained open after clicking outside
  • Multiple dropdowns could stay open simultaneously

Changes Made

  • Added outside click detection using useRef and useEffect
  • Added separate dropdown state management for sort and filter dropdowns
  • Ensured opening one dropdown automatically closes the other
  • Added proper cleanup for event listeners

Testing

  • Tested sort dropdown open/close behavior
  • Tested filter dropdown open/close behavior
  • Tested outside click closing functionality
  • Verified only one dropdown remains open at a time
  • Verified existing sorting and filtering functionality still works

Issue Fixed

Closes #1503

@vercel
Copy link
Copy Markdown

vercel Bot commented May 17, 2026

@RohitChavan16 is attempting to deploy a commit to the MD AZFAR ALAM's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, RohitChavan16, for creating this pull request and contributing to HelpOps-Hub! 💗

The maintainers will review this Pull Request and provide feedback as soon as possible! 😇

  • We appreciate your patience and contribution, Keep up the great work! 😀

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.

Dropdown menus do not close automatically on outside click or when opening another dropdown

1 participant