Change `toggle` method to `remove`

Since the class `.show` must be removed
This commit is contained in:
Rohit Sharma 2021-04-14 15:27:33 +05:30 committed by XhmikosR
parent bce4684d34
commit 7eadf73f03
1 changed files with 2 additions and 2 deletions

View File

@ -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)