-
Notifications
You must be signed in to change notification settings - Fork 183
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
Issue #420 - Splitting onOpen and onClose to before and after actions #494
base: master
Are you sure you want to change the base?
Conversation
return; | ||
} | ||
this.updateState({ isOpen: true }); | ||
if (this.onAfterOpen) { | ||
this.onAfterOpen(this.publicAPI, e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not 100% if we should call it here or wait until the afterRender
step.
I lean towards your solution, and let the user wait for the render if they want to.
This looks great. I just have one request. Can you update Ember Power Select to use the new onBeforeOpen/onBeforeClose hooks? Otherwise there will be a lot of noise. After that I'll merge it |
It's also worth noting that I'm planing a new major release updating to GlimmerComponents, and it would be a good moment to remove the now-deprecated onOpen/onClose |
Awesome! Quick question, should onAfterOpen and onAfterClose be exposed in ember-power-select or is it enough to update the onOpen and onClose internally? I noticed |
Is this PR no longer be merged? |
Issue #420
My attempt at implementing onBeforeOpen, onBeforeClose, onAfterOpen, onAfterClose hooks.
I wasn't sure what arguments should be passed to the "after" hooks and whether or not
onAfterClose
should be called if the dropdown has been destroyed.Let me know if there are any changes to documentation/implementation or tests you want.
Thanks for the great addon!