From 8df4e7a8967953fd6c1f60437b45caf0475121f3 Mon Sep 17 00:00:00 2001 From: jasongabel Date: Wed, 24 Feb 2016 20:07:24 -0500 Subject: [PATCH] Update widget-scroller.js opt no Vertical Scroll If the max-height is set to -1 for example, the the vertical scrollbar is not added because the div is not constrained with a max-height. However if you set it to 0, javascript sees a 0 as an empty/default value and uses 300 back on this line: maxHt = wo.scroller_height || 300; --- js/widgets/widget-scroller.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/js/widgets/widget-scroller.js b/js/widgets/widget-scroller.js index f66972d7..a87db989 100644 --- a/js/widgets/widget-scroller.js +++ b/js/widgets/widget-scroller.js @@ -248,8 +248,14 @@ .wrap( '
' ) .find( '.' + tscss.header ); - // use max-height, so the height resizes dynamically while filtering - $table.wrap( '
' ); + // if max-height is greater than 0 use max-height, so the height resizes dynamically while filtering + // else let the table not have a vertical scroll + if(maxHt > 0){ + $table.wrap( '
' ); + } + else { + $table.wrap( '
' ); + } $tableWrap = $table.parent(); // make scroller header sortable