mirror of
https://github.com/tabler/tabler.git
synced 2026-01-25 04:16:36 +00:00
13 lines
469 B
TypeScript
13 lines
469 B
TypeScript
import { Dropdown } from './bootstrap'
|
|
|
|
/*
|
|
Core dropdowns
|
|
*/
|
|
const dropdownTriggerList: HTMLElement[] = [].slice.call(document.querySelectorAll<HTMLElement>('[data-bs-toggle="dropdown"]'))
|
|
dropdownTriggerList.map(function (dropdownTriggerEl: HTMLElement) {
|
|
const options = {
|
|
boundary: dropdownTriggerEl.getAttribute('data-bs-boundary') === 'viewport' ? document.querySelector('.btn') : 'clippingParents',
|
|
}
|
|
return new Dropdown(dropdownTriggerEl, options)
|
|
})
|