refactor: refs #6897 update deletion handling in CrudModel component to improve data management
This commit is contained in:
parent
c04adf0e7d
commit
fcf6957b74
|
@ -237,12 +237,12 @@ async function remove(data) {
|
||||||
componentProps: {
|
componentProps: {
|
||||||
title: t('globals.confirmDeletion'),
|
title: t('globals.confirmDeletion'),
|
||||||
message: t('globals.confirmDeletionMessage'),
|
message: t('globals.confirmDeletionMessage'),
|
||||||
newData,
|
data: { deletes: ids },
|
||||||
ids,
|
ids,
|
||||||
|
promise: saveChanges,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.onOk(async () => {
|
.onOk(async () => {
|
||||||
await saveChanges({ deletes: ids });
|
|
||||||
newData = newData.filter((form) => !ids.some((id) => id == form[pk]));
|
newData = newData.filter((form) => !ids.some((id) => id == form[pk]));
|
||||||
fetch(newData);
|
fetch(newData);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue