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

Fire action on close #156

Open
gvocale opened this issue Jun 9, 2020 · 1 comment
Open

Fire action on close #156

gvocale opened this issue Jun 9, 2020 · 1 comment

Comments

@gvocale
Copy link
Contributor

gvocale commented Jun 9, 2020

Is there a way to pass an action to fire on notification close?

I.e:

this.notify.success('Saved successfully', { onClose: this.actionToFire })
@btecu
Copy link
Member

btecu commented Jun 10, 2020

It does not support that, but it's probably doable. You'd have to pass some onClose: this.someAction and then in close() you would check if there's a onClose set:

https://github.com/adopted-ember-addons/ember-notify/blob/master/addon/components/ember-notify/message.js#L58

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

No branches or pull requests

2 participants