[added] trigger onAfterOpen callback when available. - #154
Merged
claydiffrient merged 1 commit intoApr 12, 2016
Conversation
| focusManager.markForFocusLater(); | ||
| this.setState({isOpen: true}, function() { | ||
| this.setState({afterOpen: true}); | ||
| (this.props.isOpen && this.props.onAfterOpen) && this.props.onAfterOpen(); |
There was a problem hiding this comment.
Why not
if(this.props.isOpen && this.props.onAfterOpen) {
this.props.onAfterOpen();
}
here?
diasbruno
force-pushed
the
feature/onAfterOpen-callback
branch
2 times, most recently
from
April 11, 2016 13:48
386d662 to
c0642c1
Compare
Collaborator
Author
|
@claydiffrient just pinging to see if this helps with both mentioned issues and a little review in this PR. :) |
Contributor
|
@diasbruno Thanks for the ping. The suggested change that @victor-torres made sounds good to me. That will keep the code a bit more readable for those in the future. |
Collaborator
Author
|
Awesome! I'll fix this. |
diasbruno
force-pushed
the
feature/onAfterOpen-callback
branch
from
April 11, 2016 20:34
c0642c1 to
5b99ee5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi,
This patch would help to sync the refs to be accessed from the Component (so, no need for a
setTimeout). I've used the suggested name for the callback in #50onAfterOpen.This would help with #50 and #51.
Hope I followed the contribute guide.