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
Sticky toasts that cannot be dismissed? #948
Comments
You have to disable timeout for auto dismissal off |
I tried that but it still does it if the global autoDismiss is true |
Okay I will try to fix this issue |
Bro Can eloborate your requirement so i can implement in better way Btw toast dissimisal off by DisableTimeout |
Imagine a configuration like:
If I now make a toast like:
It will dismiss when yo reach 7 toasts because the service itself controls that. Also you cannot make this toast stick to top making all new toasts appear under it |
It is almost like the toast itself should have an option of autoDismiss which can be set to false so it does not follow the rules of other toasts |
Basically you want Specific toast settings Okay |
Bro I checked it from Library side and implemented as well its work well from both side ,For This I placed Your given Configuration,Its work expected what you want, |
Maintainer Pls Close this issue Its work fine no bugs in this feature yet. |
Hmm, I cannot see you repo, however, I am looking at master https://github.com/scttcper/ngx-toastr/blob/master/src/lib/toastr/toastr.service.ts#L213 and it does not show the |
bro i checked it by running it's overriding seriously |
/** create a clone of global config and apply individual settings */ |
Actually applyConfig is never assigned to this.toastrConfig when you call show() as such it is never overridden |
show(message?: string, title?: string, override: Partial = {}, type = '') { Pls read it carefully |
Where does this.applyConfig set this.toastrConfig? |
{ ...this.toastrConfig, ...override }; |
If I were to read the code out to you as well, from here - in repeating myself: https://github.com/scttcper/ngx-toastr/blob/master/src/lib/toastr/toastr.service.ts#L213
The code within _buldNotification relies on this.toastrConfig, it does not use the incoming config param |
Also that code would not work since it is wrong, you want to detect if this.toasts[0] is dismissable and if not then find one that is, tbh one solution is to allow multiple instance sof toastr in one container so you can say one set of toasts exist on top of the other under a different config, that would not only solve this since you can just mark as never having max list size and you can ensure they are always above all others. |
|
And If u place duplicate not allowed then only on toastr You will find of that instance ., |
I have two toasts that I would like to use:
However, I need these to stay on top and not be able to be dismissed by the auto dismiss in the service.
I was thinking maybe there was a way of using nested sub containers, like one container for one set of toasts and another for the rest, however, I cannot seem to find a solution.
I am surprised no one has come with this before.
Anyone else had this problem and if so any solutions?
The text was updated successfully, but these errors were encountered: