Add default value for max_items_selected

This commit is contained in:
jf-cbd
2025-11-26 18:03:26 +01:00
parent a0f28f725c
commit 6aabed3063
2 changed files with 2 additions and 2 deletions

View File

@@ -19,7 +19,7 @@ class TomSelectElement extends HTMLSelectElement {
if (this.getAttribute('data-tom-select-disable-auto-complete')) {
options.controlInput = null;
}
if (this.getAttribute('data-tom-select-max-items-selected')) {
if (this.getAttribute('data-tom-select-max-items-selected') && this.getAttribute('data-tom-select-max-items-selected') !== '') {
options.maxItems = parseInt(this.getAttribute('data-tom-select-max-items-selected'));
}
if (this.getAttribute('data-tom-select-placehelder')) {