В общем нашел оптимальный способ реализации dropdown на нативном JS:
document.addEventListener('DOMContentLoaded', () => {
const dropdownEl = '.js__dropdown';
const dropdownActive = 'dropdown-active';
function dropdownEach() {
document.querySelectorAll(dropdownEl).forEach((el) => {
if (el.classList.contains(dropdownActive)) {
el.classList.remove(dropdownActive)
}
})
}
document.addEventListener('click', (event) => {
const target = event.target
if (target.classList.contains('js__dropdown-toggle')) {
dropdownEach()
target.closest(dropdownEl).classList.add(dropdownActive);
} else if (target.closest('.js__dropdown-close')) {
dropdownEach()
} else if (!target.classList.contains('js__dropdown-toggle') && !target.closest(dropdownEl)) {
dropdownEach()
}
})
});