Proposed patch for issue #11#13
Conversation
|
Hello @coderwassananmol Can I give you a better approach? As explained here, the problem occurs because the part of the code which calculates the content's height is not considering the presence of the filter. Check the file _popup.js, line 170. There, you can see that the content's height is calculated based on popup's height and the title's height. If the select has a filter (remember: there is a parameter saying that, default is false), we should consider the filter too. The solution would be something like that: let popupHeight = _calculatePopupHeight();
let titleHeight = _$title.outerHeight();
let filterHeight = _$filter.outerHeight();
let contentHeight = (popupHeight - titleHeight);
if(_properties.hasFilter)
contentHeight = contentHeight - filterHeight;
_$content.outerHeight(contentHeight);You must check if the hasFilter is true because even when the filter field is not visible, it has the size 44px. It's because its visibility is controlled by |
|
Brilliant @StanleySathler |
|
Yay! Very excited with the contribution, @coderwassananmol. Already merged. 🔥 |
Patch for #11