clear displayed transactions when changing filter
This commit is contained in:
@@ -307,6 +307,11 @@ export const useTransactionsStore = defineStore('transactions', {
|
||||
this.transactionsNextTimeId = 0;
|
||||
this.transactionListStateInvalid = true;
|
||||
},
|
||||
clearTransactions() {
|
||||
this.transactions = [];
|
||||
this.transactionsNextTimeId = 0;
|
||||
this.transactionListStateInvalid = true;
|
||||
},
|
||||
initTransactionListFilter(filter) {
|
||||
if (filter && isNumber(filter.dateType)) {
|
||||
this.transactionsFilter.dateType = filter.dateType;
|
||||
|
||||
@@ -740,7 +740,9 @@ export default {
|
||||
minTime: recentDateRange.minTime
|
||||
});
|
||||
|
||||
this.loading = true;
|
||||
this.currentPageTransactions = [];
|
||||
this.transactionsStore.clearTransactions();
|
||||
this.$router.push(this.getFilterLinkUrl());
|
||||
},
|
||||
changeCustomDateFilter(minTime, maxTime) {
|
||||
@@ -756,7 +758,9 @@ export default {
|
||||
|
||||
this.showCustomDateRangeDialog = false;
|
||||
|
||||
this.loading = true;
|
||||
this.currentPageTransactions = [];
|
||||
this.transactionsStore.clearTransactions();
|
||||
this.$router.push(this.getFilterLinkUrl());
|
||||
},
|
||||
changeTypeFilter(type) {
|
||||
@@ -775,6 +779,9 @@ export default {
|
||||
categoryId: removeCategoryFilter ? '0' : undefined
|
||||
});
|
||||
|
||||
this.loading = true;
|
||||
this.currentPageTransactions = [];
|
||||
this.transactionsStore.clearTransactions();
|
||||
this.$router.push(this.getFilterLinkUrl());
|
||||
},
|
||||
changeCategoryFilter(categoryId) {
|
||||
@@ -786,6 +793,9 @@ export default {
|
||||
categoryId: categoryId
|
||||
});
|
||||
|
||||
this.loading = true;
|
||||
this.currentPageTransactions = [];
|
||||
this.transactionsStore.clearTransactions();
|
||||
this.$router.push(this.getFilterLinkUrl());
|
||||
},
|
||||
changeAccountFilter(accountId) {
|
||||
@@ -797,6 +807,9 @@ export default {
|
||||
accountId: accountId
|
||||
});
|
||||
|
||||
this.loading = true;
|
||||
this.currentPageTransactions = [];
|
||||
this.transactionsStore.clearTransactions();
|
||||
this.$router.push(this.getFilterLinkUrl());
|
||||
},
|
||||
changeKeywordFilter(keyword) {
|
||||
|
||||
Reference in New Issue
Block a user