fix npm build error
This commit is contained in:
parent
74dabae390
commit
07baf55612
@ -171,6 +171,11 @@ interface ChoiceEvent extends Event{
|
|||||||
}
|
}
|
||||||
|
|
||||||
function initNewChoice(select: HTMLInputElement) {
|
function initNewChoice(select: HTMLInputElement) {
|
||||||
|
|
||||||
|
let seats = 0;
|
||||||
|
if (select.dataset && select.dataset.seats) {
|
||||||
|
seats = +select.dataset.seats;
|
||||||
|
}
|
||||||
const choice = new Choices(select, {
|
const choice = new Choices(select, {
|
||||||
removeItemButton: true,
|
removeItemButton: true,
|
||||||
loadingText: 'Wird geladen...',
|
loadingText: 'Wird geladen...',
|
||||||
@ -178,7 +183,7 @@ function initNewChoice(select: HTMLInputElement) {
|
|||||||
noChoicesText: 'Keine Ergebnisse gefunden',
|
noChoicesText: 'Keine Ergebnisse gefunden',
|
||||||
itemSelectText: 'Zum Auswählen klicken',
|
itemSelectText: 'Zum Auswählen klicken',
|
||||||
placeholderValue: 'Ruderer auswählen',
|
placeholderValue: 'Ruderer auswählen',
|
||||||
maxItemCount: select.dataset.seats,
|
maxItemCount: seats,
|
||||||
maxItemText: (maxItemCount) => {
|
maxItemText: (maxItemCount) => {
|
||||||
return `Nur ${maxItemCount} Ruderer können hinzugefügt werden`;
|
return `Nur ${maxItemCount} Ruderer können hinzugefügt werden`;
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user