fix: prevent double initialization of tomselect and update style

This commit is contained in:
2026-05-01 13:51:20 -04:00
parent 66e0e467df
commit ea0c1272d1
@@ -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'