angular-toastr icon indicating copy to clipboard operation
angular-toastr copied to clipboard

Improve clear

Open ahgittin opened this issue 8 years ago • 3 comments

As per discussion at https://github.com/Foxandxss/angular-toastr/issues/137:

  • Sometimes clear(toast) doesn't immediately clear
  • People expect clear([toast]) should work for a list arg [toast]

This fixes both issues.

ahgittin avatar Jan 24 '17 16:01 ahgittin

Hi @Foxandxss -- anything I can do to encourage you to merge this? thx!

ahgittin avatar Feb 09 '17 15:02 ahgittin

I just need time to think, that is a breaking change which forces me a new major version.

Foxandxss avatar Feb 09 '17 15:02 Foxandxss

@Foxandxss I don't think it breaks the API -- just expands it to accept clear(list) in addition to clear(toast) and clear() which both still work as before.

and the contract of remove should be that the toast is immediately gone, from the user's perspective. if the destroy is immediate it is no-op, but in cases where the event handler delays the destroy (until other toasts finish for some reason i couldn't figure out) setting the element's html to "" means it is apparently gone until the handler catches up.

LMK if i can help at all. thx.

ahgittin avatar Feb 09 '17 16:02 ahgittin