Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear selections after batch edit #9798

Merged
merged 4 commits into from Dec 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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