From 9d2887e6b9ff94d85caa5a696a97fc38944655c8 Mon Sep 17 00:00:00 2001 From: zsloan Date: Tue, 2 Feb 2021 15:33:14 -0600 Subject: Disabled Scroller for search results when there are fewer than 20 results (in order to avoid strange behavior when there are only a handful of rows) --- wqflask/wqflask/templates/search_result_page.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wqflask/wqflask/templates/search_result_page.html b/wqflask/wqflask/templates/search_result_page.html index 2dde5727..1a034741 100644 --- a/wqflask/wqflask/templates/search_result_page.html +++ b/wqflask/wqflask/templates/search_result_page.html @@ -386,11 +386,13 @@ 'sDom': "iti", "autoWidth": true, "bSortClasses": false, + {% if trait_list|length > 20 %} "scrollY": "100vh", "scroller": true, "scrollCollapse": true + {% endif %} } ); - + trait_table.draw(); //ZS: This makes the table adjust its height properly on initial load $('.toggle-vis').on( 'click', function (e) { -- cgit v1.2.3