From 96cb1a52b192f20b5adfeb1c2e6d3f3e5aa8d09c Mon Sep 17 00:00:00 2001 From: Anmol Wassan Date: Sun, 8 Oct 2017 07:15:46 +0000 Subject: [PATCH] Updated patch considering select has a filter --- dist/js/sth-select.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/dist/js/sth-select.js b/dist/js/sth-select.js index 012f13b..5655024 100644 --- a/dist/js/sth-select.js +++ b/dist/js/sth-select.js @@ -152,13 +152,7 @@ _renderList(); var height = _calculatePopupHeight(); - if(height == MAX_HEIGHT) { - _$popup.css({'height':'auto'}); - height = _$popup.height(); - _$popup.animate({ height:height}, 500); - } - else - _$popup.animate({ height: height }, 500); + _$popup.animate({ height: height }, 500); } /** @@ -224,7 +218,11 @@ var popupHeight = _calculatePopupHeight(); var titleHeight = _$title.outerHeight(); - _$content.outerHeight(popupHeight - titleHeight); + var filterHeight = _$filter.outerHeight(); + var contentHeight = (popupHeight - titleHeight); + if(_properties.hasFilter) + contentHeight = contentHeight - filterHeight; + _$content.outerHeight(contentHeight); } /**