Skip to content

Commit 5cc5baa

Browse files
committed
style selectMultipleWithCtrl dropdown as multi dropdown
1 parent 0bb9271 commit 5cc5baa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

web/dropdown.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class Dropdown {
6464
this.currentValueElem = this.elem.appendChild(document.createElement('div'));
6565
this.currentValueElem.className = 'dropdownCurrentValue';
6666

67-
alterClass(this.elem, 'multi', multipleAllowed);
67+
alterClass(this.elem, 'multi', (multipleAllowed || selectMultipleWithCtrl));
6868
this.elem.appendChild(this.menuElem);
6969

7070
document.addEventListener('click', (e) => {
@@ -230,7 +230,7 @@ class Dropdown {
230230
for (let i = 0; i < this.options.length; i++) {
231231
const escapedName = escapeHtml(this.options[i].name);
232232
html += '<div class="dropdownOption' + (this.optionsSelected[i] ? ' ' + CLASS_SELECTED : '') + '" data-id="' + i + '" title="' + escapedName + '">' +
233-
(this.multipleAllowed && this.optionsSelected[i] ? '<div class="dropdownOptionMultiSelected">' + SVG_ICONS.check + '</div>' : '') +
233+
((this.multipleAllowed || this.selectMultipleWithCtrl) && this.optionsSelected[i] ? '<div class="dropdownOptionMultiSelected">' + SVG_ICONS.check + '</div>' : '') +
234234
escapedName + (typeof this.options[i].hint === 'string' && this.options[i].hint !== '' ? '<span class="dropdownOptionHint">' + escapeHtml(this.options[i].hint!) + '</span>' : '') +
235235
(this.showInfo ? '<div class="dropdownOptionInfo" title="' + escapeHtml(this.options[i].value) + '">' + SVG_ICONS.info + '</div>' : '') +
236236
'</div>';

0 commit comments

Comments
 (0)