diff --git a/resources/js/components/Card.vue b/resources/js/components/Card.vue index ca8ebb9..c3a951f 100644 --- a/resources/js/components/Card.vue +++ b/resources/js/components/Card.vue @@ -20,11 +20,9 @@ export default { methods:{ async reloadResources(){ if(this.resourceName){ - let filters_backup = _.cloneDeep(this.$store.getters[`${this.resourceName}/filters`]); - let filters_to_change = _.cloneDeep(filters_backup); - filters_to_change.push({}); - await this.$store.commit(`${this.resourceName}/storeFilters`,filters_to_change); - await this.$store.commit(`${this.resourceName}/storeFilters`,filters_backup); + let currentFilters = _.cloneDeep(this.$store.state[`${this.resourceName}`]['filters']); + await this.$store.commit(`${this.resourceName}/storeFilters`, {}); + await this.$store.commit(`${this.resourceName}/storeFilters`, currentFilters); } } }