toastr: Add preventDuplicates

This commit is contained in:
John Reilly
2015-01-28 10:50:19 +00:00
parent 016db435a6
commit ad84b59549
2 changed files with 7 additions and 1 deletions
+2 -1
View File
@@ -47,7 +47,8 @@ function test_fromdemo() {
toastr.options = {
debug: $('#debugInfo').prop('checked'),
tapToDismiss: $('#tapToDismiss').prop('checked'),
positionClass: $('#positionGroup input:radio:checked').val() || 'toast-top-right'
positionClass: $('#positionGroup input:radio:checked').val() || 'toast-top-right',
preventDuplicates: true
}
if ($fadeIn.val().length) {
toastr.options.showDuration = +$fadeIn.val()
+5
View File
@@ -114,6 +114,11 @@ interface ToastrOptions {
**/
newestOnTop?: boolean;
/**
* Rather than having identical toasts stack, set the preventDuplicates property to true. Duplicates are matched to the previous toast based on their message content.
*/
preventDuplicates?: boolean;
/**
* Function to execute on toast click
*/