mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-12-14 22:35:17 -05:00
fix: Improved bulk deletion by reducing refreshs (#6634)
Co-authored-by: David Schinkel <david@zollsoft.de> Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
This commit is contained in:
@@ -209,12 +209,8 @@ export default defineNuxtComponent({
|
||||
}
|
||||
|
||||
async function deleteSelected() {
|
||||
for (const item of bulkDeleteTarget.value) {
|
||||
if (!item.id) {
|
||||
continue;
|
||||
}
|
||||
await categoryStore.actions.deleteOne(item.id);
|
||||
}
|
||||
const ids = bulkDeleteTarget.value.map(item => item.id).filter(id => !!id);
|
||||
await categoryStore.actions.deleteMany(ids);
|
||||
bulkDeleteTarget.value = [];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user