Fixed auto table update messing with user input
This commit is contained in:
parent
1875160f6f
commit
cdb66470b5
1 changed files with 33 additions and 30 deletions
|
|
@ -53,7 +53,9 @@
|
|||
|
||||
// Update Cells
|
||||
|
||||
row.dataset.deviceId = deviceData.id
|
||||
if (row.dataset.deviceId != deviceData.id || row.cells[3].innerHTML != deviceData.data?.timestamp) {
|
||||
// Only update if data has changed
|
||||
row.dataset.deviceId = deviceData.id;
|
||||
row.cells[0].innerHTML = deviceData.name;
|
||||
row.cells[1].innerHTML = deviceData.config?.typeConfig;
|
||||
row.cells[2].innerHTML = deviceData.data?.valueStr;
|
||||
|
|
@ -89,6 +91,7 @@
|
|||
|
||||
$(".toggle-switch").bootstrapSwitch({inverse: true, size: "mini"});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue