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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user