From 0522b23c9c0ada10df4afdc9be2251cd680b4356 Mon Sep 17 00:00:00 2001 From: zsloan Date: Mon, 7 Jun 2021 21:13:13 +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_gene.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wqflask/wqflask/templates/gsearch_gene.html b/wqflask/wqflask/templates/gsearch_gene.html index 8ff36c1b..e951c0b1 100644 --- a/wqflask/wqflask/templates/gsearch_gene.html +++ b/wqflask/wqflask/templates/gsearch_gene.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') { @@ -158,7 +158,7 @@ 'columns': [ { 'orderDataType': "dom-checkbox", - 'width': "25px", + 'width': "10px", 'data': null, 'render': function(data, type, row, meta) { return '' @@ -291,6 +291,8 @@ '' + '' ); + + the_table.draw(); }); -- cgit v1.2.3