Skip to content

Commit f58f24f

Browse files
committed
hide query on empty group search
1 parent 4c85dce commit f58f24f

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/components/access_group/AccessGroupList.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,13 @@ export default {
9999
this.resetOptions();
100100
}
101101
this.listOptions.search = searchQuery;
102+
if (this.$route.query.group !== searchQuery) {
103+
if (this.$route.query.group && searchQuery === '') {
104+
this.$router.replace({ query: {} });
105+
} else {
106+
this.$router.replace({ query: { group: searchQuery } });
107+
}
108+
}
102109
await this.fetchList(this.listOptions);
103110
},
104111
searchFormKeyUpHandler(searchQuery, scope) {
@@ -140,8 +147,8 @@ export default {
140147
nextClicked: false,
141148
groupList: [],
142149
listOptions: {
143-
search: this.$route.query.group || '',
144150
...defaultListOptions,
151+
search: this.$route.query.group || '',
145152
},
146153
selectedSort: defaultListOptions.sort,
147154
next: null,

0 commit comments

Comments
 (0)