fix disabling select boxes if addItems false, document corrects scopes in interface

This commit is contained in:
alex 2020-04-16 04:58:57 +02:00
parent 21a6e22711
commit 2c57d3a690
2 changed files with 5 additions and 4 deletions

View file

@ -347,9 +347,10 @@ class Choices implements Choices {
this._render(); this._render();
this._addEventListeners(); this._addEventListeners();
const shouldDisable = let shouldDisable = this.passedElement.element.hasAttribute('disabled');
!this.config.addItems || if (this._isTextElement) {
this.passedElement.element.hasAttribute('disabled'); shouldDisable = shouldDisable || !this.config.addItems;
}
if (shouldDisable) { if (shouldDisable) {
this.disable(); this.disable();

View file

@ -105,7 +105,7 @@ export interface Options {
/** /**
* Whether a user can add items. * Whether a user can add items.
* *
* **Input types affected:** text * **Input types affected:** text, select, select-multiple
* *
* @default true * @default true
*/ */