From 2dba3e932460fa59b22ebc581cdf0f106888ec7a Mon Sep 17 00:00:00 2001 From: Bubka <858858+Bubka@users.noreply.github.com> Date: Tue, 1 Dec 2020 07:03:45 +0100 Subject: [PATCH] Fix #15 : Applied group filter is not removed if the group is deleted --- resources/js/views/Groups.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/resources/js/views/Groups.vue b/resources/js/views/Groups.vue index 17f8a943..995bef1e 100644 --- a/resources/js/views/Groups.vue +++ b/resources/js/views/Groups.vue @@ -102,6 +102,13 @@ // Remove the deleted group from the collection this.groups = this.groups.filter(a => a.id !== id) + + // Reset persisted group filter to 'All' (groupId=0) + if( parseInt(this.$root.appSettings.activeGroup) === id ) { + this.axios.post('/api/settings/options', { activeGroup: 0 }).then(response => { + this.$root.appSettings.activeGroup = 0 + }) + } } }