' +
228 | (this.multipleAllowed && this.optionsSelected[i] ? '
' + SVG_ICONS.check + '
' : '') +
229 | escapedName + (typeof this.options[i].hint === 'string' && this.options[i].hint !== '' ? '
' + escapeHtml(this.options[i].hint!) + '' : '') +
230 | (this.showInfo ? '
' + SVG_ICONS.info + '
' : '') +
231 | '
';
232 | }
233 | this.optionsElem.className = 'dropdownOptions' + (this.showInfo ? ' showInfo' : '');
234 | this.optionsElem.innerHTML = html;
235 | this.filterInput.style.display = 'none';
236 | this.noResultsElem.style.display = 'none';
237 | this.menuElem.style.cssText = 'opacity:0; display:block;';
238 | // Width must be at least 138px for the filter element.
239 | // Don't need to add 12px if showing (info icons or multi checkboxes) and the scrollbar isn't needed. The scrollbar isn't needed if: menuElem height + filter input (25px) < 297px
240 | const menuElemRect = this.menuElem.getBoundingClientRect();
241 | this.currentValueElem.style.width = Math.max(Math.ceil(menuElemRect.width) + ((this.showInfo || this.multipleAllowed) && menuElemRect.height < 272 ? 0 : 12), 138) + 'px';
242 | this.menuElem.style.cssText = 'right:0; overflow-y:auto; max-height:297px;'; // Max height for the dropdown is [filter (31px) + 9.5 * dropdown item (28px) = 297px]
243 | if (this.dropdownVisible) this.filter();
244 | }
245 |
246 | /**
247 | * Filter the options displayed in the dropdown list, based on the filter criteria specified by the user.
248 | */
249 | private filter() {
250 | let val = this.filterInput.value.toLowerCase(), match, matches = false;
251 | for (let i = 0; i < this.options.length; i++) {
252 | match = this.options[i].name.toLowerCase().indexOf(val) > -1;
253 | (