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

Add onDestroy callback method for flash object destroy #211

Merged

Conversation

scanieso
Copy link
Contributor

@scanieso scanieso commented Oct 10, 2016

This PR adds a callback function that can be passed in and called when a flash is destroyed.

  • Add callback method handler
  • Add unit test for destroyed flash object
  • Update README for how to use callback

Addresses: #212

@scanieso scanieso force-pushed the add-onDestroy-callback branch from e581ab0 to 41ee7df Compare October 10, 2016 20:48
@homu
Copy link
Contributor

homu commented Oct 26, 2016

☔ The latest upstream changes (presumably f5002eb) made this pull request unmergeable. Please resolve the merge conflicts.

@patrickng
Copy link

Ran into a scenario where I need this functionality - @scanieso This looks a couple months old, would you by any chance have time to fix the merge conflicts so that the collaborators can merge it? If not, I can clean it up for merge.

@scanieso scanieso force-pushed the add-onDestroy-callback branch 2 times, most recently from 712118d to ce0c46e Compare January 7, 2017 17:37
@scanieso scanieso force-pushed the add-onDestroy-callback branch from ce0c46e to 4d3671c Compare January 7, 2017 17:38
@scanieso scanieso changed the title [WIP] add onDestroy callback method for flash object destroy Add onDestroy callback method for flash object destroy Jan 7, 2017
@scanieso
Copy link
Contributor Author

scanieso commented Jan 7, 2017

Thanks for the ping @patrickng . Updated and ready for review.

Copy link
Collaborator

@sbatson5 sbatson5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! Just 1 small comment then :shipit: 👍

@@ -144,6 +144,12 @@ Ember.get(this, 'flashMessages').success('This is amazing', {

By default, flash messages will be destroyed on click. Disabling this can be useful if the message supports user interaction.

- `onDestroy: function`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind also adding an example of this on line 90?

@sbatson5 sbatson5 merged commit fe56fda into adopted-ember-addons:master Jan 8, 2017
@patrickng
Copy link

Thank you @scanieso and @sbatson5 !

@scanieso scanieso deleted the add-onDestroy-callback branch September 22, 2017 16:39
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.

4 participants