Skip to content

Commit

Permalink
Change toggle method to remove
Browse files Browse the repository at this point in the history
Since the class `.show` must be removed
  • Loading branch information
rohit2sharma95 authored and XhmikosR committed Apr 18, 2021
1 parent bce4684 commit 7eadf73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/src/dropdown.js
Expand Up @@ -259,8 +259,8 @@ class Dropdown extends BaseComponent {
this._popper.destroy()
}

this._menu.classList.toggle(CLASS_NAME_SHOW)
this._element.classList.toggle(CLASS_NAME_SHOW)
this._menu.classList.remove(CLASS_NAME_SHOW)
this._element.classList.remove(CLASS_NAME_SHOW)
this._element.setAttribute('aria-expanded', 'false')
Manipulator.removeDataAttribute(this._menu, 'popper')
EventHandler.trigger(this._element, EVENT_HIDDEN, relatedTarget)
Expand Down

0 comments on commit 7eadf73

Please sign in to comment.