-
Notifications
You must be signed in to change notification settings - Fork 6
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
Dismissable setting doesn't work both ways #14
Comments
Hi, @charlieandroid55 ! The For this, I'll add a
<ngx-sonner-toaster closeButton="false"/> toast('Some message', {closeButton: true});
<ngx-sonner-toaster closeButton /> toast('Some message', {closeButton: false}); Also, I'll be adding some docs to the types so everything is clearer. |
Hi @tutkli, ok, it works for me, but I think you should keep the API simpler. Maybe another global property can be applied to indicate that toasts can be swipeable and marking the toast instance with |
I understand, but I think it's okay to have the two options as they are two diferent actions. Adds more customization. Bear with me as this is the first angular port I make , but I'm trying to make it as best as possible 😅 |
🎉 This issue has been resolved in version 1.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Please provide the environment you discovered this bug in.
Description
The dismissable configuration, which is managed at the instance level, in my opinion, should override the global closeButton configuration in both directions. If I set closeButton to true, I expect most of my toasts to have that action, except for a few that cannot be closed. However, if I set closeButton to false, I mean that none of them should be closable by default, except for the one that has dismissable set to true. This way, I would have control over when and how a toast can be dismissed.
Currently, the behavior works as expected in version 0.4.1 for the following configuration: closeButton=true | dismissable=false.
However, the following configuration needs to be implemented: closeButton=false | dismissable=true.
Please provide the exception or error you saw
No response
Other information
No response
I would be willing to submit a PR to fix this issue
The text was updated successfully, but these errors were encountered: