Toastr not firing multiple times.
See original GitHub issueHello,
When I got something like this
function send(form) {
elearningMessage.Create({
text: vm.message,
conversation_id: vm.conversation.id
}).then(function (response) {
if (response.success !== false) {
vm.conversation.messages.push(response);
vm.message = undefined;
form.$setPristine();
toastr.error('Meee');
toastr.success('Message sent');
} else {
toastr.error(response.error);
}
});
}
Exact lines:
toastr.error('Meee');
toastr.success('Message sent');
Above toastr will fire each message sent with two popups.
Below toastr will fire only once when I would get an error message but only once initial, not every time when my request will go with error.
toastr.error(response.error);
???
Issue Analytics
- State:
- Created 8 years ago
- Comments:14 (6 by maintainers)
Top Results From Across the Web
Duplicate toastr error messages - Stack Overflow
The code is to check whether there are existing error toastr which has the same message being displayed. I will only fire the...
Read more >jQuery Toast Plugin
Note Hit the run button multiple times to test these demos. 7. Positioning the toast. position property can be used to specify the...
Read more >Lightning toastEvent firing twice - how to avoid
Hi, We have a lighting component opens through quick action popup. After finishing the task we are refreshing the record detail page, ...
Read more >Toasts - Bootstrap
Toasts will automatically hide if you do not specify autohide: false . Examples. Basic. To encourage extensible and predictable toasts, we recommend a...
Read more >How to Create Angular Toastr Notifications - JScrambler Blog
No other part of the application needs any change. Customizing The Toast Notification. ngx-toastr provides a number of options to customize the ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@tskorupka : found the solution to the issue. It says in the documention that by default toastr is configured to allow duplicates of previously show toasts, but apparently something is going wrong there. So all that needs to be done is put this bit of code in your application and it would work.
That explains everything, thank you.