Skip to content

Commit

Permalink
✨ added emit event
Browse files Browse the repository at this point in the history
To know if the toggled target's panel is already open.
  • Loading branch information
jsblair9 authored Jan 15, 2019
1 parent 785bdc8 commit 536b2e8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/HexToggle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@
// this.$el.classList.toggle('is-open');
// HexBus.$emit('HexToggle:toggled', this.targetPanel._uid, this.accordion);
HexBus.$emit('HexToggle:toggled', this)
if (this.targetPanelIsOpen) {
HexBus.$emit('HexToggle:toggledParent', this)
}
this.targetPanelIsOpen = !this.targetPanelIsOpen;
},
Expand Down

0 comments on commit 536b2e8

Please sign in to comment.