Skip to content

Commit

Permalink
Clear selections after batch edit (#9798)
Browse files Browse the repository at this point in the history
* Clear selections after batch edit

* remove redundant selection clears

* only refresh after batch saving

* use clearer function name
  • Loading branch information
azrikahar committed Dec 1, 2021
1 parent 6e609ea commit a79345a
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions app/src/modules/content/routes/collection.vue
Expand Up @@ -222,7 +222,7 @@
v-model:active="batchEditActive"
:primary-keys="selection"
:collection="collection"
@refresh="refresh"
@refresh="drawerBatchRefresh"
/>
<template #sidebar>
Expand Down Expand Up @@ -442,6 +442,7 @@ export default defineComponent({
bookmarkIsMine,
bookmarkSaving,
clearLocalSave,
drawerBatchRefresh,
refresh,
refreshInterval,
currentLayout,
Expand All @@ -453,6 +454,11 @@ export default defineComponent({
await layoutRef.value?.state?.refresh?.();
}
async function drawerBatchRefresh() {
selection.value = [];
await refresh();
}
function useBreadcrumb() {
const breadcrumb = computed(() => [
{
Expand Down Expand Up @@ -499,9 +505,9 @@ export default defineComponent({
data: batchPrimaryKeys,
});
selection.value = [];
await refresh();
selection.value = [];
confirmDelete.value = false;
} catch (err: any) {
error.value = err;
Expand All @@ -527,10 +533,10 @@ export default defineComponent({
},
});
confirmArchive.value = false;
selection.value = [];
await refresh();
confirmArchive.value = false;
} catch (err: any) {
error.value = err;
} finally {
Expand Down

0 comments on commit a79345a

Please sign in to comment.