From 752c115008a8eb992fb9fca5bd8bd8c68dbe42df Mon Sep 17 00:00:00 2001 From: zsloan Date: Mon, 7 Jun 2021 21:13:52 +0000 Subject: Define the table and then do the_table.draw() to fix issue where column headers sometimes aren't aligned with rows + change width of checkbox column --- wqflask/wqflask/templates/gsearch_pheno.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wqflask/wqflask/templates/gsearch_pheno.html b/wqflask/wqflask/templates/gsearch_pheno.html index 5f1465d7..89316cbc 100644 --- a/wqflask/wqflask/templates/gsearch_pheno.html +++ b/wqflask/wqflask/templates/gsearch_pheno.html @@ -107,7 +107,7 @@ } } - $('#trait_table').DataTable( { + var the_table = $('#trait_table').DataTable( { 'drawCallback': function( settings ) { $('#trait_table tr').click(function(event) { if (event.target.type !== 'checkbox' && event.target.tagName.toLowerCase() !== 'a') { @@ -147,7 +147,7 @@ { 'data': null, 'orderDataType': "dom-checkbox", - 'width': "25px", + 'width': "10px", 'render': function(data, type, row, meta) { return '' } @@ -281,6 +281,8 @@ '' + '' ); + + the_table.draw(); }); -- cgit v1.2.3