Set table busy state on load
- Add busy prop to tables
Signed-off-by: Kenneth Fullbright <kennyneedsmilky@gmail.com>
Change-Id: I4416f12967c9a0ad6c8bb782c7d8de5c17fdd195
diff --git a/src/views/HardwareStatus/Sensors/Sensors.vue b/src/views/HardwareStatus/Sensors/Sensors.vue
index 15cecff..6329d9d 100644
--- a/src/views/HardwareStatus/Sensors/Sensors.vue
+++ b/src/views/HardwareStatus/Sensors/Sensors.vue
@@ -53,6 +53,7 @@
:filter="searchFilter"
:empty-text="$t('global.table.emptyMessage')"
:empty-filtered-text="$t('global.table.emptySearchMessage')"
+ :busy="isBusy"
@filtered="onFiltered"
@row-selected="onRowSelected($event, filteredSensors.length)"
>
@@ -146,6 +147,7 @@
},
data() {
return {
+ isBusy: true,
fields: [
{
key: 'checkbox',
@@ -220,9 +222,10 @@
},
created() {
this.startLoader();
- this.$store
- .dispatch('sensors/getAllSensors')
- .finally(() => this.endLoader());
+ this.$store.dispatch('sensors/getAllSensors').finally(() => {
+ this.endLoader();
+ this.isBusy = false;
+ });
},
methods: {
sortCompare(a, b, key) {