Skip to content

Allow isOpen to be controlled by the parent component#1

Merged
TrevorBurnham merged 1 commit intomasterfrom
add-isopen-prop
Feb 24, 2016
Merged

Allow isOpen to be controlled by the parent component#1
TrevorBurnham merged 1 commit intomasterfrom
add-isopen-prop

Conversation

@TrevorBurnham
Copy link
Contributor

@colbyr This PR adds an isOpen prop that overrides state.isOpen. This struck me as the simplest change that would allow us to control the open state from the parent component. The one drawback is that input events still trigger onOpen/onClose. If that turns out to be a problem, we can add more logic to prevent that from happening.

This change does not prevent onOpen/onClose events from firing.
@colbyr
Copy link

colbyr commented Feb 24, 2016

Seems reasonable. I think the events firing will be ok still.

TrevorBurnham added a commit that referenced this pull request Feb 24, 2016
Allow isOpen to be controlled by the parent component
@TrevorBurnham TrevorBurnham merged commit a245c13 into master Feb 24, 2016
@TrevorBurnham TrevorBurnham deleted the add-isopen-prop branch February 24, 2016 21:16
@TrevorBurnham TrevorBurnham mentioned this pull request Jun 14, 2016
TrevorBurnham pushed a commit that referenced this pull request Jun 22, 2016
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.

2 participants