forked from AkkomaGang/admin-fe
Enable active and local filters on users tab by default
This commit is contained in:
parent
ca3745e237
commit
065efcab7f
1 changed files with 5 additions and 1 deletions
|
@ -21,7 +21,7 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
value: []
|
||||
value: ['local', 'active']
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -29,6 +29,10 @@ export default {
|
|||
return this.$store.state.app.device === 'desktop'
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const currentFilters = this.$data.value.reduce((acc, filter) => ({ ...acc, [filter]: true }), {})
|
||||
this.$store.dispatch('ToggleUsersFilter', currentFilters)
|
||||
},
|
||||
methods: {
|
||||
removeOppositeFilters() {
|
||||
const filtersQuantity = Object.keys(this.$store.state.users.filters).length
|
||||
|
|
Loading…
Reference in a new issue