From 2841dde5b902391e9f875f1e2daf69c85db413fa Mon Sep 17 00:00:00 2001 From: Ellery Newcomer Date: Sat, 2 Jun 2018 07:48:37 -0700 Subject: [PATCH] dropdown be shown in bootstrap 4 --- src/dropdown/aubs-dropdown.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/dropdown/aubs-dropdown.js b/src/dropdown/aubs-dropdown.js index 9b82fa2..d7130c2 100644 --- a/src/dropdown/aubs-dropdown.js +++ b/src/dropdown/aubs-dropdown.js @@ -104,9 +104,20 @@ export class AubsDropdownCustomAttribute { } else { this.element.classList.remove(this.showClass); } + + if(bootstrapOptions.version === 4) { + let menus = this.element.getElementsByClassName('dropdown-menu'); + for(let i = 0; i < menus.length; i++) { + if(this.state) { + menus[i].classList.add(this.showClass); + }else{ + menus[i].classList.remove(this.showClass); + } + } + } } hasIsOpen() { return this.isOpen !== undefined && this.isOpen !== null; } -} \ No newline at end of file +}