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