Skip to content
Snippets Groups Projects
Commit 20a56bb2 authored by Angelina Filippova's avatar Angelina Filippova
Browse files

Clear search and filter inputs when vue instance is destroyed

parent 1c2782a5
No related branches found
No related tags found
1 merge request!133Update displaying and managing accounts with invalid nicknames
This commit is part of merge request !133. Comments created here will be created in the context of that merge request.
......@@ -124,6 +124,10 @@ const users = {
dispatch('ApplyChanges', { updatedUsers, callApiFn, userId: _userId })
},
ClearUsersState({ commit }) {
commit('SET_SEARCH_QUERY', '')
commit('SET_USERS_FILTERS', { local: false, external: false, active: false, deactivated: false })
},
async ClearFilters({ commit, dispatch, state }) {
commit('CLEAR_USERS_FILTERS')
dispatch('SearchUsers', { query: state.searchQuery, page: 1 })
......
......@@ -179,6 +179,9 @@ export default {
this.$store.dispatch('NeedReboot')
this.$store.dispatch('FetchUsers', { page: 1 })
},
destroyed() {
this.$store.dispatch('ClearUsersState')
},
methods: {
activationIcon(status) {
return status ? 'el-icon-error' : 'el-icon-success'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment