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

feat(Modal/Slideover): emit close-prevented event #1207

Merged
merged 3 commits into from
Jan 19, 2024

Conversation

Youhan
Copy link
Contributor

@Youhan Youhan commented Jan 6, 2024

πŸ”— Linked issue

No linked issue

❓ 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

The Modal has a prevent-close prop. I added an emit for when the close is prevented. This way the user can know that the close is prevented. This is useful when you are preventing a close with a computed ref and you want to do something in the UI when the close is being prevented to prevent rage clicks.

πŸ“ Checklist

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

Copy link

vercel bot commented Jan 6, 2024

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

Name Status Preview Updated (UTC)
ui βœ… Ready (Inspect) Visit Preview Jan 10, 2024 7:46am

@Youhan Youhan changed the title feat: add close-prevented emit for Modal feat(Modal): add close-prevented emit for Modal Jan 6, 2024
Copy link
Member

It would be nice to replicate those changes on the Slideover component as it's the same logic.

@Youhan
Copy link
Contributor Author

Youhan commented Jan 9, 2024

Oh! right! I'll add it to Sliderover too. Thanks!

@benjamincanac benjamincanac changed the title feat(Modal): add close-prevented emit for Modal feat(Modal/Slideover): emit close-prevented event Jan 19, 2024
@benjamincanac benjamincanac merged commit 6faf15b into nuxt:dev Jan 19, 2024
2 checks passed
@Youhan Youhan deleted the add-close-prevented-modal branch January 19, 2024 19:17
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.

2 participants