Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Link): check disabled prop before navigating #1321

Conversation

solamichealolawale
Copy link
Contributor

πŸ”— Linked issue

Resolves #1320

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This pull request addresses the issue where the disabled attribute of the UButton & ULink component fails to function properly when used alongside the :to attribute. Currently, even when the button is disabled, clicking on it still triggers the redirection, disregarding the disabled state

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

Copy link

vercel bot commented Feb 6, 2024

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Updated (UTC)
ui βœ… Ready (Inspect) Visit Preview Feb 6, 2024 8:30pm

Copy link
Member

Choose a reason for hiding this comment

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

Would you mind removing the lock?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not a problem. Would do just that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@benjamincanac benjamincanac changed the title fix(link): ensure disable prop check before navigating fix(Link): check disabled prop before navigating Feb 6, 2024
@benjamincanac benjamincanac merged commit ac42ec1 into nuxt:dev Feb 6, 2024
2 checks passed
@benjamincanac
Copy link
Member

Thanks! 😊

@solamichealolawale solamichealolawale deleted the fix/ubutton-disabled-to-attribute-issue branch February 7, 2024 07:54
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.

UButton disabled doesnt work with 'to' attribute
2 participants