Skip to content

Commit

Permalink
Updated patch considering select has a filter
Browse files Browse the repository at this point in the history
  • Loading branch information
coderwassananmol authored Oct 8, 2017
1 parent e7a9b4f commit 96cb1a5
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions dist/js/sth-select.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit 96cb1a5

Please sign in to comment.