From 33cbfd4435711c41ea6669c1f37ad425ba40d6b6 Mon Sep 17 00:00:00 2001 From: Anton Date: Tue, 27 Feb 2024 11:23:23 +0100 Subject: [PATCH] Fix table and comments bugs [SCI-10279][SCI-10285] --- app/javascript/vue/projects/list.vue | 2 +- app/javascript/vue/shared/datatable/table.vue | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/javascript/vue/projects/list.vue b/app/javascript/vue/projects/list.vue index 94d21eaeb..f21b409fe 100644 --- a/app/javascript/vue/projects/list.vue +++ b/app/javascript/vue/projects/list.vue @@ -245,7 +245,7 @@ export default { `; }, openComments(_params, rows) { - this.$refs.commentButton.dataset.objectId = rows[0].id; + $(this.$refs.commentButton).data('objectId', rows[0].id); this.$refs.commentButton.click(); }, access(event, rows) { diff --git a/app/javascript/vue/shared/datatable/table.vue b/app/javascript/vue/shared/datatable/table.vue index d914b7ae1..7cec2db3c 100644 --- a/app/javascript/vue/shared/datatable/table.vue +++ b/app/javascript/vue/shared/datatable/table.vue @@ -206,7 +206,7 @@ export default { suppressCellFocus: true, rowHeight: 40, headerHeight: 40, - getRowId: (params) => `e2e-TB-row-${params.data.id}` + getRowId: (params) => `e2e-TB-row-${params.data.code || params.data.id}` }; }, extendedColumnDefs() { @@ -359,7 +359,9 @@ export default { state: this.tableState.columnsState, applyOrder: true }); + setTimeout(() => { + this.gridApi.refreshHeader(); this.initializing = false; }, 200); },