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

ClickHandler is called twice on exit button press #35

Closed
gurdilou opened this issue Jun 21, 2016 · 3 comments
Closed

ClickHandler is called twice on exit button press #35

gurdilou opened this issue Jun 21, 2016 · 3 comments
Labels

Comments

@gurdilou
Copy link

Hi,

I try to handle toast clicks, so I attached a function to the ClickHandler :

    let toast: Toast = {
        type: 'info',
        title: title,
        body: 'Click here to cancel',
        showCloseButton: true,
        timeout: 9000,

        clickHandler: (toast , isCloseButton) => {
          console.log("isCloseButton : "+isCloseButton);
          return true;
        }
    };
    this.toastr.pop(toast);

But the function is called twice when the user press the exit button.

Have I missed something ?

@Stabzs
Copy link
Owner

Stabzs commented Jun 21, 2016

The above sample looks reasonable.

Could you please create a plunker that demonstrates the behavior? I can't reproduce it.

@gurdilou
Copy link
Author

@Stabzs Stabzs added the bug label Jun 23, 2016
@Stabzs Stabzs closed this as completed in 534d301 Jul 8, 2016
@Stabzs
Copy link
Owner

Stabzs commented Jul 8, 2016

Apologies for the delayed fix. This was a bug only when the ClickHandler evaluated to false and the toast was not removed.

This is included in the 0.3.6-rc.4 release.

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

No branches or pull requests

2 participants