diff --git a/src/stores/transaction.js b/src/stores/transaction.js index a99d72dd..063b21db 100644 --- a/src/stores/transaction.js +++ b/src/stores/transaction.js @@ -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; diff --git a/src/views/desktop/transactions/ListPage.vue b/src/views/desktop/transactions/ListPage.vue index 70d71883..d274b171 100644 --- a/src/views/desktop/transactions/ListPage.vue +++ b/src/views/desktop/transactions/ListPage.vue @@ -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) {