fix npm build error

This commit is contained in:
philipp 2023-10-30 19:13:34 +01:00
parent 74dabae390
commit 07baf55612

View File

@ -171,6 +171,11 @@ interface ChoiceEvent extends Event{
}
function initNewChoice(select: HTMLInputElement) {
let seats = 0;
if (select.dataset && select.dataset.seats) {
seats = +select.dataset.seats;
}
const choice = new Choices(select, {
removeItemButton: true,
loadingText: 'Wird geladen...',
@ -178,7 +183,7 @@ function initNewChoice(select: HTMLInputElement) {
noChoicesText: 'Keine Ergebnisse gefunden',
itemSelectText: 'Zum Auswählen klicken',
placeholderValue: 'Ruderer auswählen',
maxItemCount: select.dataset.seats,
maxItemCount: seats,
maxItemText: (maxItemCount) => {
return `Nur ${maxItemCount} Ruderer können hinzugefügt werden`;
},