}
show(event) {
- this.hide();
+ this.hideAll();
this.menu.style.display = 'block';
this.menu.classList.add('anim', 'menuIn');
event.stopPropagation();
}
+ hideAll() {
+ for (let dropdown of window.components.dropdown) {
+ dropdown.hide();
+ }
+ }
+
hide() {
this.menu.style.display = 'none';
this.menu.classList.remove('anim', 'menuIn');