From a9dcc1091a3b02c79e9e6625f22dced79ee0a1a5 Mon Sep 17 00:00:00 2001 From: zsloan Date: Tue, 24 Oct 2023 17:39:30 +0000 Subject: Make DataTables automatically adjust columns are generating the table --- wqflask/wqflask/static/new/javascript/create_datatable.js | 1 + 1 file changed, 1 insertion(+) diff --git a/wqflask/wqflask/static/new/javascript/create_datatable.js b/wqflask/wqflask/static/new/javascript/create_datatable.js index 84754da8..541dfdf5 100644 --- a/wqflask/wqflask/static/new/javascript/create_datatable.js +++ b/wqflask/wqflask/static/new/javascript/create_datatable.js @@ -70,6 +70,7 @@ create_table = function(tableId="trait_table", tableData = [], columnDefs = [], theTable = $('#' + tableId).DataTable(tableSettings); theTable.draw(); $('#' + tableId + '_container').css("width", String($('#' + tableId).width() + 17) + "px"); + theTable.columns.adjust().draw(); } } -- cgit v1.2.3