From 3e1137ca65cba85f0cbcd5e6f098036610ba8fca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 31 May 2022 17:28:40 +0200 Subject: [PATCH] Web: fix status_requested not disappearing from Tabulator --- web/app/src/components/workers/WorkersTable.vue | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/web/app/src/components/workers/WorkersTable.vue b/web/app/src/components/workers/WorkersTable.vue index d21376ec..637fc1d5 100644 --- a/web/app/src/components/workers/WorkersTable.vue +++ b/web/app/src/components/workers/WorkersTable.vue @@ -114,6 +114,12 @@ export default { let promise; if (existingRow) { + // Tabbulator doesn't update ommitted fields, but if `status_requested` + // is ommitted it means "no status change requested"; this should still + // force an update. + if (!workerUpdate.status_requested) { + workerUpdate.status_requested = undefined; + } promise = this.tabulator.updateData([workerUpdate]); // Tabulator doesn't know we're using 'status_requested' in the 'status' // column, so it also won't know to redraw when that field changes. @@ -124,6 +130,9 @@ export default { promise .then(this.sortData) .then(this.refreshAvailableStatuses); + + // TODO: this should also resize the columns, as the status column can + // change sizes considerably. }, onRowClick(event, row) {