From 0f6779796233fe7eadbb9dda73640af81d9e7fa2 Mon Sep 17 00:00:00 2001
From: Udo Walter
Date: Thu, 18 Apr 2019 15:48:18 +0000
Subject: [webapp/groups] clear table filters if group id changes

---
 webapp/src/components/GroupModuleClientList.vue | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

(limited to 'webapp/src/components/GroupModuleClientList.vue')

diff --git a/webapp/src/components/GroupModuleClientList.vue b/webapp/src/components/GroupModuleClientList.vue
index e73a3fb..bc1dc52 100644
--- a/webapp/src/components/GroupModuleClientList.vue
+++ b/webapp/src/components/GroupModuleClientList.vue
@@ -30,7 +30,7 @@
 <template>
   <div>
     <v-divider></v-divider>
-    <data-table v-model="selected" :headers="headers" :items="clients" :loading="loading" @dblclick="loadClient($event)" min-width="1300px" copy-button>
+    <data-table ref="table" v-model="selected" :headers="headers" :items="clients" :loading="loading" @dblclick="loadClient($event)" min-width="1300px" copy-button>
       <div slot="actions" slot-scope="row" style="text-align: right">
         <v-btn icon @click.stop @mousedown="loadClient(row.item)" style="margin: 0"><v-icon>keyboard_arrow_right</v-icon></v-btn>
       </div>
@@ -86,6 +86,11 @@ export default {
       return this.$store.state.groups.tabChain[this.tabIndex].loading
     }
   },
+  watch: {
+    groupId () {
+      if (this.$refs.table) this.$refs.table.resetData()
+    }
+  },
   methods: {
     ...mapMutations('groups', ['setActiveTab', 'setTab', 'setDialog']),
     loadClient (item) {
-- 
cgit v1.2.3-55-g7522

