diff --git a/frontend/main.ts b/frontend/main.ts index fc4a377..f393d48 100644 --- a/frontend/main.ts +++ b/frontend/main.ts @@ -425,8 +425,10 @@ function initNewChoice(select: HTMLInputElement) { maxItemText: (maxItemCount) => { return `Nur ${maxItemCount} Ruderer können hinzugefügt werden`; }, - callbackOnInit: function () { - this._currentState.items.forEach(function (obj) { + callbackOnInit: function (this: Choices) { + const items = this.getValue(); // Get all selected items + const itemsArray = Array.isArray(items) ? items : [items]; + itemsArray.forEach((obj: any) => { if (boat_in_ottensheim && obj.customProperties) { if (obj.customProperties.is_racing) { const coxSelect = ( diff --git a/frontend/package.json b/frontend/package.json index 0b42352..09560f2 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -9,20 +9,20 @@ "preview": "vite preview" }, "devDependencies": { - "@playwright/test": "^1.40.1", - "@types/d3": "^7.4.1", - "@types/node": "^20.11.4", - "autoprefixer": "^10.4.14", - "postcss": "^8.4.21", - "sass": "^1.60.0", - "tailwindcss": "^3.3.1", - "typescript": "^4.9.5", - "vite": "^4.2.0", - "vite-plugin-static-copy": "^0.13.1" + "@playwright/test": "^1.55.1", + "@types/d3": "^7.4.3", + "@types/node": "^24.6.1", + "autoprefixer": "^10.4.21", + "postcss": "^8.5.6", + "sass": "^1.93.2", + "tailwindcss": "^3.4.18", + "typescript": "^5.9.3", + "vite": "^7.1.7", + "vite-plugin-static-copy": "^3.1.3" }, "dependencies": { - "choices.js": "^10.2.0", - "d3": "^7.8.5", - "terser": "^5.21.0" + "choices.js": "^11.1.0", + "d3": "^7.9.0", + "terser": "^5.44.0" } }