forked from TFMM/silent-auction
debug: update tomselect initialization and check
This commit is contained in:
@@ -3,16 +3,14 @@
|
||||
<script>
|
||||
window.addEventListener('load', () => {
|
||||
document.querySelectorAll('select').forEach((el) => {
|
||||
if (!el.classList.contains('tomselected')) {
|
||||
if (!el.classList.contains('ts-hidden-accessible')) {
|
||||
console.log('Initializing TomSelect on:', el);
|
||||
new TomSelect(el, {
|
||||
create: false,
|
||||
hideSelected: true,
|
||||
maxOptions: null,
|
||||
sortField: {
|
||||
field: "text",
|
||||
direction: "asc"
|
||||
},
|
||||
controlInput: '<input type="text" />'
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user