Skip to content
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

Improve clear #219

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Improve clear #219

wants to merge 2 commits into from

Conversation

ahgittin
Copy link

As per discussion at #137:

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

This fixes both issues.

since the usage of `clear([toast])` as optional syntax is confusing to people
seems the destroy call is not always immediate
@ahgittin
Copy link
Author

ahgittin commented Feb 9, 2017

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

@Foxandxss
Copy link
Owner

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

@ahgittin
Copy link
Author

ahgittin commented Feb 9, 2017

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants