|
1 | | -/*! choices.js v11.2.0 | © 2025 Josh Johnson | https://github.com/jshjohnson/Choices#readme */ |
| 1 | +/*! choices.js v11.2.0 | © 2026 Josh Johnson | https://github.com/jshjohnson/Choices#readme */ |
2 | 2 |
|
3 | 3 | /****************************************************************************** |
4 | 4 | Copyright (c) Microsoft Corporation. |
@@ -3427,7 +3427,7 @@ var Choices = /** @class */ (function () { |
3427 | 3427 | this.initialised = false; |
3428 | 3428 | this._store = new Store(config); |
3429 | 3429 | this._currentValue = ''; |
3430 | | - config.searchEnabled = (!isText && config.searchEnabled) || isSelectMultiple; |
| 3430 | + config.searchEnabled = !isText && config.searchEnabled; |
3431 | 3431 | this._canSearch = config.searchEnabled; |
3432 | 3432 | this._isScrollingOnIe = false; |
3433 | 3433 | this._highlightPosition = 0; |
@@ -5170,25 +5170,25 @@ var Choices = /** @class */ (function () { |
5170 | 5170 | containerInner.wrap(passedElement.element); |
5171 | 5171 | // Wrapper inner container with outer container |
5172 | 5172 | containerOuter.wrap(containerInner.element); |
| 5173 | + containerOuter.element.appendChild(containerInner.element); |
| 5174 | + containerOuter.element.appendChild(dropdownElement); |
| 5175 | + containerInner.element.appendChild(this.itemList.element); |
| 5176 | + dropdownElement.appendChild(this.choiceList.element); |
5173 | 5177 | if (this._isSelectOneElement) { |
5174 | 5178 | this.input.placeholder = this.config.searchPlaceholderValue || ''; |
| 5179 | + if (this.config.searchEnabled) { |
| 5180 | + dropdownElement.insertBefore(this.input.element, dropdownElement.firstChild); |
| 5181 | + } |
5175 | 5182 | } |
5176 | 5183 | else { |
| 5184 | + if (!this._isSelectMultipleElement || this.config.searchEnabled) { |
| 5185 | + containerInner.element.appendChild(this.input.element); |
| 5186 | + } |
5177 | 5187 | if (this._placeholderValue) { |
5178 | 5188 | this.input.placeholder = this._placeholderValue; |
5179 | 5189 | } |
5180 | 5190 | this.input.setWidth(); |
5181 | 5191 | } |
5182 | | - containerOuter.element.appendChild(containerInner.element); |
5183 | | - containerOuter.element.appendChild(dropdownElement); |
5184 | | - containerInner.element.appendChild(this.itemList.element); |
5185 | | - dropdownElement.appendChild(this.choiceList.element); |
5186 | | - if (!this._isSelectOneElement) { |
5187 | | - containerInner.element.appendChild(this.input.element); |
5188 | | - } |
5189 | | - else if (this.config.searchEnabled) { |
5190 | | - dropdownElement.insertBefore(this.input.element, dropdownElement.firstChild); |
5191 | | - } |
5192 | 5192 | this._highlightPosition = 0; |
5193 | 5193 | this._isSearching = false; |
5194 | 5194 | }; |
|
0 commit comments