-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Type specific default options #571
Comments
this is what I expect would be awesome |
I'm not sure I understand the load function. I'm suggesting something that isn't message specific, by building it into the
My thinking is that options would remain hierarchical as they are currently. So that What do you think? Is this in keeping with the design principles of the project? |
Turns out this is about 5 lines so I did it and will publish it as a PR. The new property is
|
…e options hierarchy. -- uses new options object property typeBasedOverrides where typeBasedOverrides is an object with child objects of each type that accept the same parameters as overrideOptions options = { typeBasedOverrides: { info: {}, success: {}, warning: {}, error: {} } see CodeSeven#571
This would be very fine! I was just thinking that I'd like to persist error and warning messages instead of fading them after a while (while keeping success messages fading) |
I have already implemented it and submitted a pull request. I'm waiting on
acceptance.
#574
… This would be very fine! I was just thinking that I'd like to persist
error and warning messages instead of fading them after a while (while
keeping success messages fading)
Hope it would be implemented soon! :-)
|
I really could use that too. Is this gonna get merged soon by any chance? Thanks. |
I'm waiting for this merge too! |
While using toastr in my project I realised that I really wanted different default options per toast type (info/warning/error/etc.).
I could make a wrapper but that feels redundant given how simple the wrapper would be.
I can do the work and I can do it without causing a breaking change, but I wanted to make sure that maintainers agree it's worth implementing.
The text was updated successfully, but these errors were encountered: