mirror of
https://github.com/Choices-js/Choices.git
synced 2024-05-03 22:33:12 +02:00
fix disabling select boxes if addItems false, document corrects scopes in interface
This commit is contained in:
parent
21a6e22711
commit
2c57d3a690
|
@ -347,9 +347,10 @@ class Choices implements Choices {
|
|||
this._render();
|
||||
this._addEventListeners();
|
||||
|
||||
const shouldDisable =
|
||||
!this.config.addItems ||
|
||||
this.passedElement.element.hasAttribute('disabled');
|
||||
let shouldDisable = this.passedElement.element.hasAttribute('disabled');
|
||||
if (this._isTextElement) {
|
||||
shouldDisable = shouldDisable || !this.config.addItems;
|
||||
}
|
||||
|
||||
if (shouldDisable) {
|
||||
this.disable();
|
||||
|
|
|
@ -105,7 +105,7 @@ export interface Options {
|
|||
/**
|
||||
* Whether a user can add items.
|
||||
*
|
||||
* **Input types affected:** text
|
||||
* **Input types affected:** text, select, select-multiple
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue