From 1a8249732db89f9346d47cc21a6189a7e88f4529 Mon Sep 17 00:00:00 2001 From: Gauthier Roebroeck Date: Fri, 18 Feb 2022 16:35:13 +0800 Subject: [PATCH] perf(webui): reduce duplicate api calls for components with datatables --- komga-webui/src/components/AuthenticationActivityTable.vue | 3 --- komga-webui/src/components/PageHashMatchesTable.vue | 3 +-- komga-webui/src/views/SettingsDuplicates.vue | 3 --- komga-webui/src/views/SettingsMediaAnalysis.vue | 3 --- 4 files changed, 1 insertion(+), 11 deletions(-) diff --git a/komga-webui/src/components/AuthenticationActivityTable.vue b/komga-webui/src/components/AuthenticationActivityTable.vue index bfaa857b9..369decff3 100644 --- a/komga-webui/src/components/AuthenticationActivityTable.vue +++ b/komga-webui/src/components/AuthenticationActivityTable.vue @@ -73,9 +73,6 @@ export default Vue.extend({ return headers }, }, - async mounted() { - this.loadData() - }, methods: { async loadData() { this.loading = true diff --git a/komga-webui/src/components/PageHashMatchesTable.vue b/komga-webui/src/components/PageHashMatchesTable.vue index b99158958..45fffd48a 100644 --- a/komga-webui/src/components/PageHashMatchesTable.vue +++ b/komga-webui/src/components/PageHashMatchesTable.vue @@ -68,13 +68,12 @@ export default Vue.extend({ }, deep: true, }, - hash(val) { + hash() { this.options.page = 1 this.options.sortBy = [] this.options.sortDesc = [] this.elements = [] this.totalElements = 0 - this.loadData(val) }, }, computed: { diff --git a/komga-webui/src/views/SettingsDuplicates.vue b/komga-webui/src/views/SettingsDuplicates.vue index 0f7e542e8..72d313649 100644 --- a/komga-webui/src/views/SettingsDuplicates.vue +++ b/komga-webui/src/views/SettingsDuplicates.vue @@ -77,9 +77,6 @@ export default Vue.extend({ ] }, }, - async mounted() { - this.loadBooks() - }, methods: { async loadBooks() { this.loading = true diff --git a/komga-webui/src/views/SettingsMediaAnalysis.vue b/komga-webui/src/views/SettingsMediaAnalysis.vue index 7ffc8cd4a..aeb2b339e 100644 --- a/komga-webui/src/views/SettingsMediaAnalysis.vue +++ b/komga-webui/src/views/SettingsMediaAnalysis.vue @@ -78,9 +78,6 @@ export default Vue.extend({ })) }, }, - async mounted() { - this.loadBooks() - }, methods: { async loadBooks() { this.loading = true