From cac58ee18b7adf6bd180916c726b560b60eebf4e Mon Sep 17 00:00:00 2001 From: Teodora Pavlova <27234545+TeodoraPavlova@users.noreply.github.com> Date: Wed, 17 Apr 2024 15:42:57 +0300 Subject: [PATCH] Refresh entity list on delete/restore --- frontend/src/components/EntityList.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/EntityList.vue b/frontend/src/components/EntityList.vue index c0de5b1..bedf2b6 100644 --- a/frontend/src/components/EntityList.vue +++ b/frontend/src/components/EntityList.vue @@ -155,8 +155,8 @@ export default { this.selected = this.$refs.selector.getSelected(); }, onDeletion() { - const promises = this.selected.map(eId => { - this.$api.deleteEntity({ + const promises = this.selected.map(async eId => { + await this.$api.deleteEntity({ schemaSlug: this.schema.slug, entityIdOrSlug: eId }); @@ -164,8 +164,8 @@ export default { Promise.all(promises).then(() => this.getEntities({resetPage: true})); }, onRestoration() { - const promises = this.selected.map(eId => { - this.$api.restoreEntity({ + const promises = this.selected.map(async eId => { + await this.$api.restoreEntity({ schemaSlug: this.schema.slug, entityIdOrSlug: eId });