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 <yoshiemuranaka@gmail.com>
Change-Id: I7711d3aa0ddf2eea2fc0c613ef7a7882245d3cf1
diff --git a/src/views/Health/Sensors/Sensors.vue b/src/views/Health/Sensors/Sensors.vue
index 6cd70be..5379eae 100644
--- a/src/views/Health/Sensors/Sensors.vue
+++ b/src/views/Health/Sensors/Sensors.vue
@@ -162,13 +162,8 @@
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 @@
},
onFilterChange({ activeFilters }) {
this.activeFilters = activeFilters;
- this.filteredSensors = this.getFilteredTableData(
- this.allSensors,
- activeFilters
- );
}
}
};