Skip to content

Fix swap and reset buttons being disabled when data is present#118

Merged
O2sa merged 6 commits intoO2sa:mainfrom
BhathiyaVicum:main
Apr 26, 2026
Merged

Fix swap and reset buttons being disabled when data is present#118
O2sa merged 6 commits intoO2sa:mainfrom
BhathiyaVicum:main

Conversation

@BhathiyaVicum
Copy link
Copy Markdown
Contributor

Fixes #114

Summary

The swap and reset buttons were being disabled when both input fields were empty, even if comparison data was already displayed. This prevented users from interacting with the existing results.

This PR updates the disabled condition to ensure the buttons remain enabled when data is present.

Changes

  • Updated disabled condition for swap button
  • Updated disabled condition for reset button
  • New condition: (!data && isEmpty) || loading

Checklist

  • Correct logic applied as per issue
  • No UI breaking changes
  • Behavior verified manually

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 26, 2026

@BhathiyaVicum is attempting to deploy a commit to the osama's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link
Copy Markdown

Thank you for the pull request! ✅

A maintainer will review this soon. Please be patient while we take a look. 🙌

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dev-impact Ready Ready Preview, Comment Apr 26, 2026 7:52pm

@O2sa O2sa merged commit 4c5aa39 into O2sa:main Apr 26, 2026
1 check passed
@github-actions
Copy link
Copy Markdown

Thank you, @BhathiyaVicum! Another great contribution merged! 🚀

You've been a fantastic contributor! We truly appreciate your continued support.

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.

fix: Do not disable swap and reset buttons when data is present

2 participants