preline
Version:
Preline UI is an open-source set of prebuilt UI components based on the utility-first Tailwind CSS framework.
20 lines (14 loc) • 454 B
text/typescript
import HSComboBox from './core';
window.addEventListener('load', () => {
HSComboBox.autoInit();
});
document.addEventListener('scroll', () => {
if (!window.$hsComboBoxCollection) return false;
const target = window.$hsComboBoxCollection.find((el) => el.element.isOpened);
if (target && !target.element.preventAutoPosition) {
target.element.recalculateDirection();
}
});
if (typeof window !== 'undefined') {
window.HSComboBox = HSComboBox;
}