Skip to content

Conversation

@mahi656
Copy link

@mahi656 mahi656 commented Oct 23, 2025

Description:
This PR enhances the CurrencySelector component by implementing a click-outside-to-close feature. Previously, the dropdown closed only when clicking the button again; now it automatically closes when the user clicks anywhere outside. Implemented using useRef and useEffect to detect outside clicks, improving usability and aligning with standard dropdown behavior.

Related Issue:
Fixes # 161

Types of Changes:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Enhancement (improvement to an existing feature)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Test (adds or updates tests only)
  • Documentation (non-code change)

How Has This Been Tested?

  • Manual: Opened dropdown and clicked outside; confirmed it closes. Clicks inside keep it open.
  • Automated: Added unit test in CurrencySelector.test.jsx simulating outside clicks to ensure the dropdown closes.

Checklist:

  • My code follows the code style of this project
  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

@netlify
Copy link

netlify bot commented Oct 23, 2025

Deploy Preview for paisable ready!

Name Link
🔨 Latest commit b327d0e
🔍 Latest deploy log https://app.netlify.com/projects/paisable/deploys/68fa2fc129e15b0008adeec6
😎 Deploy Preview https://deploy-preview-161--paisable.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 93
Accessibility: 100
Best Practices: 100
SEO: 91
PWA: 80
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

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.

1 participant