From 396aaab761da86698dcb5890b0a6960a90d3459b Mon Sep 17 00:00:00 2001 From: Yoshie Muranaka Date: Wed, 20 May 2020 10:11:06 -0700 Subject: Refactor Sensors filtered data Removed setter on computed filteredSensors value. Explicitly setting filteredSensors value is not necessary because activeFilters property change automatically updates the computed value. Signed-off-by: Yoshie Muranaka Change-Id: I7711d3aa0ddf2eea2fc0c613ef7a7882245d3cf1 --- src/views/Health/Sensors/Sensors.vue | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'src/views') diff --git a/src/views/Health/Sensors/Sensors.vue b/src/views/Health/Sensors/Sensors.vue index 6cd70be8..5379eae8 100644 --- a/src/views/Health/Sensors/Sensors.vue +++ b/src/views/Health/Sensors/Sensors.vue @@ -162,13 +162,8 @@ export default { allSensors() { return this.$store.getters['sensors/sensors']; }, - filteredSensors: { - get: function() { - return this.getFilteredTableData(this.allSensors, this.activeFilters); - }, - set: function(newVal) { - return newVal; - } + filteredSensors() { + return this.getFilteredTableData(this.allSensors, this.activeFilters); } }, created() { @@ -203,10 +198,6 @@ export default { }, onFilterChange({ activeFilters }) { this.activeFilters = activeFilters; - this.filteredSensors = this.getFilteredTableData( - this.allSensors, - activeFilters - ); } } }; -- cgit v1.2.3