Skip to content

Commit

Permalink
Refresh entity list on delete/restore
Browse files Browse the repository at this point in the history
  • Loading branch information
TeodoraPavlova committed Apr 17, 2024
1 parent 098e161 commit cac58ee
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frontend/src/components/EntityList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -155,17 +155,17 @@ 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
});
});
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
});
Expand Down

0 comments on commit cac58ee

Please sign in to comment.