8000 feat(toast) Callback on Toast expiration by mhelbich Β· Pull Request #4210 Β· nuxt/ui Β· GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat(toast) Callback on Toast expiration #4210

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

Open
wants to merge 4 commits into
base: v3
Choose a base branch
from

Conversation

mhelbich
Copy link

πŸ”— Linked issue

Resolves #4206

❓ 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

I also remember that there used to be a callback functionality in v2 of Nuxt UI. So here is a simple implementation of that previous behavior. You can provide a callback (Function) as a prop for toasts again. They are executed after the timer expires or the user clicks on the close button manually. NextTick is used to make sure the callback executes after the closing of the Toast (onClose).

This is my first time trying to contribute to an open source project. Please inform me about any mistakes I made.

πŸ“ Checklist

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

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.

[useToast] include callback when dynamically creating toasts
1 participant
0