From 02ebb6e145d130c25ee4189970aacf4141b3fbfc Mon Sep 17 00:00:00 2001 From: Diego Rodriguez Date: Fri, 16 Aug 2019 16:36:43 -0400 Subject: [PATCH 1/2] fixed duplicate query --- src/components/results/resultPanel.vue | 4 ++-- src/components/results/tabData.vue | 18 ++++++++++-------- src/store/modules/results.js | 2 +- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/components/results/resultPanel.vue b/src/components/results/resultPanel.vue index 88187202..bb237e6e 100644 --- a/src/components/results/resultPanel.vue +++ b/src/components/results/resultPanel.vue @@ -9,10 +9,10 @@ - Overview + Query Table diff --git a/src/components/results/tabData.vue b/src/components/results/tabData.vue index 64531174..7b0bb46d 100644 --- a/src/components/results/tabData.vue +++ b/src/components/results/tabData.vue @@ -159,14 +159,16 @@ export default { }); }, options(value) { - this.$store.dispatch("queryObjects", { - query_parameters: this.$store.state.search.query_parameters, - page: this.currentPage, - perPage: this.$store.state.perPage, - total: this.$store.state.results.total, - sortBy: value.sortBy[0], - sortDesc: value.sortDesc[0] - }); + if (value.sortBy !== old.sortBy || value.sortDesc != old.sortDesc) { + this.$store.dispatch("queryObjects", { + query_parameters: this.$store.state.search.query_parameters, + page: this.currentPage, + perPage: this.$store.state.perPage, + total: this.$store.state.results.total, + sortBy: value.sortBy[0], + sortDesc: value.sortDesc[0] + }); + } } } }; diff --git a/src/store/modules/results.js b/src/store/modules/results.js index 40b2bf3f..a0a98770 100644 --- a/src/store/modules/results.js +++ b/src/store/modules/results.js @@ -157,7 +157,7 @@ export const state = { total: null, num_pages: null, showObjectDetailsModal: false, - currentPage: null, + currentPage: 1, recentObjects: 'counting...', recentAlerts: 'counting...', xmatchedCount: 'counting...', From 2f92412d82364cda9479a9cefec6330435e29842 Mon Sep 17 00:00:00 2001 From: dirodriguezm Date: Tue, 20 Aug 2019 15:52:55 -0400 Subject: [PATCH 2/2] fixed bug with options in tab --- src/components/results/tabData.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/results/tabData.vue b/src/components/results/tabData.vue index 7b0bb46d..00e778b7 100644 --- a/src/components/results/tabData.vue +++ b/src/components/results/tabData.vue @@ -158,7 +158,7 @@ export default { sortDesc: this.options.sortDesc[0] }); }, - options(value) { + options(value, old) { if (value.sortBy !== old.sortBy || value.sortDesc != old.sortDesc) { this.$store.dispatch("queryObjects", { query_parameters: this.$store.state.search.query_parameters,