Created
January 28, 2017 19:14
-
-
Save tbranyen/a0d63a8f95e8431de943b6cffe9e0bac to your computer and use it in GitHub Desktop.
When your web component is also a reactive component...
This file contains 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
toggleExpanded() { | |
this.setState({ isExpanded: !this.state.isExpanded }); | |
// Close siblings w/o needing a store or global container! | |
[...this.parentNode.children].filter(x => x !== this).forEach(row => { | |
row.setState({ isExpanded: false }); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment