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

feature: supply remove method for toast, to close one message instead of close all #1395

Closed
wants to merge 2 commits into from

Conversation

oldbig
Copy link
Contributor

@oldbig oldbig commented Jul 30, 2021

###Feature Requests
The Toast message component can close a group message or close all groups messages, but can't close one message by calling a method, so in the slot, we can't close the current toast message, just as the demo showed, we must close all by call removeGroup. This pull request is just added the remove method to close one message, the usage is shown in ToastDoc.vue.

@cagataycivici
Copy link
Member

Thanks, we'll implement a similar solution.

@develar
Copy link

develar commented Apr 3, 2022

It is strange that pull request was not accepted, but the missing feature is still not implemented. My use case: show error on network request, but close the error message once another attempt of this request is successful.

@AndrewMHenry
Copy link

It is strange that pull request was not accepted, but the missing feature is still not implemented. My use case: show error on network request, but close the error message once another attempt of this request is successful.

Our use case is similar: we want to show a "sticky" toast message (that doesn't disappear until the user closes it) whenever one of our services disconnects. But, if the service reconnects, we want to remove that message automatically.

We thought of trying to define a separate group for each message, so we could use removeGroup(). Unfortunately, there are multiple services, and we also want all of the toast messages to appear in the same location (top-right of the screen), so we can't define a separate group for each message.

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.

4 participants