diff options
author | GeoSot <geo.sotis@gmail.com> | 2021-10-10 15:24:07 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2021-12-01 18:10:39 +0300 |
commit | 2d32802f53660b0146e0f78d1c8cd1fb58c0233e (patch) | |
tree | d514d21db82dca035931d3c2ff21bb280927fd1e /js/src | |
parent | fb5921dec49da37e9bab745d7319037e89e2f31e (diff) |
Dropdown: Change constant to the way we use it
Diffstat (limited to 'js/src')
-rw-r--r-- | js/src/dropdown.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/js/src/dropdown.js b/js/src/dropdown.js index d5c42b012d..2376e74cdd 100644 --- a/js/src/dropdown.js +++ b/js/src/dropdown.js @@ -53,10 +53,10 @@ const CLASS_NAME_SHOW = 'show' const CLASS_NAME_DROPUP = 'dropup' const CLASS_NAME_DROPEND = 'dropend' const CLASS_NAME_DROPSTART = 'dropstart' -const CLASS_NAME_NAVBAR = 'navbar' const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="dropdown"]' const SELECTOR_MENU = '.dropdown-menu' +const SELECTOR_NAVBAR = '.navbar' const SELECTOR_NAVBAR_NAV = '.navbar-nav' const SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)' @@ -275,7 +275,7 @@ class Dropdown extends BaseComponent { } _detectNavbar() { - return this._element.closest(`.${CLASS_NAME_NAVBAR}`) !== null + return this._element.closest(SELECTOR_NAVBAR) !== null } _getOffset() { |