fix(accidentForm): prevent reactivity issues by creating a new sorted array

- Modified the sorting logic in AccidentFormDialog to create a new array from the filtered members, addressing potential reactivity problems during sorting.
This commit is contained in:
Torsten Schulz (local)
2026-01-14 14:07:27 +01:00
parent 515e04d1e3
commit 663125670e

View File

@@ -108,7 +108,8 @@ export default {
console.log('[AccidentFormDialog] filtered.length:', filtered.length);
// Alphabetisch sortieren nach Nachname, dann Vorname
const sorted = filtered.sort((a, b) => {
// Erstelle ein neues Array, um Reaktivitätsprobleme zu vermeiden
const sorted = [...filtered].sort((a, b) => {
const lastNameA = (a.lastName || '').toLowerCase();
const lastNameB = (b.lastName || '').toLowerCase();
if (lastNameA !== lastNameB) {