forked from TFMM/silent-auction
fix: prevent double initialization of tomselect and update style
This commit is contained in:
@@ -3,8 +3,15 @@
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
document.querySelectorAll('select').forEach((el) => {
|
||||
// Check if Tom Select is already initialized
|
||||
if (el.tomselect) {
|
||||
return;
|
||||
}
|
||||
|
||||
new TomSelect(el, {
|
||||
create: false,
|
||||
hideSelected: true,
|
||||
maxOptions: null,
|
||||
sortField: {
|
||||
field: 'text',
|
||||
direction: 'asc'
|
||||
|
||||
Reference in New Issue
Block a user