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.

@archa8 archa8 added the hacktoberfest-accepted The pull request is a valid, non-spam contribution for Hacktoberfest label Oct 31, 2025
@archa8
Copy link
Member

archa8 commented Oct 31, 2025

Hey @mahi656, you were not assigned to this issue, so I cannot merge your PR. However, this bug fix works, so I am assigning this PR the hacktoberfest-accepted label. Thank you for your contribution.

@archa8 archa8 closed this Oct 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest-accepted The pull request is a valid, non-spam contribution for Hacktoberfest

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants