ソースを参照

Fix #15 : Applied group filter is not removed if the group is deleted

Bubka 4 年 前
コミット
2dba3e9324
1 ファイル変更7 行追加0 行削除
  1. 7 0
      resources/js/views/Groups.vue

+ 7 - 0
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
+                        })
+                    }
                 }
             }