diff --git a/platypush/backend/http/webapp/src/components/panels/Entities/Index.vue b/platypush/backend/http/webapp/src/components/panels/Entities/Index.vue index 041bf22a1..662b87651 100644 --- a/platypush/backend/http/webapp/src/components/panels/Entities/Index.vue +++ b/platypush/backend/http/webapp/src/components/panels/Entities/Index.vue @@ -256,6 +256,16 @@ export default { this.entities[entityId] = entity }, + onEntityDelete(event) { + const entityId = event.entity?.id + if (entityId == null) + return + if (entityId === this.modalEntityId) + this.modalEntityId = null + if (this.entities[entityId]) + delete this.entities[entityId] + }, + onEntityModal(entityId) { if (entityId) { this.modalEntityId = entityId @@ -274,6 +284,12 @@ export default { 'platypush.message.event.entities.EntityUpdateEvent' ) + this.subscribe( + this.onEntityDelete, + 'on-entity-delete', + 'platypush.message.event.entities.EntityDeleteEvent' + ) + this.sync() }, } diff --git a/platypush/backend/http/webapp/src/components/panels/Entities/Modal.vue b/platypush/backend/http/webapp/src/components/panels/Entities/Modal.vue index f4f256b08..1a2b608bb 100644 --- a/platypush/backend/http/webapp/src/components/panels/Entities/Modal.vue +++ b/platypush/backend/http/webapp/src/components/panels/Entities/Modal.vue @@ -1,5 +1,12 @@