Version 4.0.1

This commit is contained in:
Josh Johnson 2018-10-27 20:18:23 +01:00
parent 4fdf7b8d1d
commit dad2b345cd
3 changed files with 8 additions and 17 deletions

View file

@ -1,4 +1,4 @@
/*! choices.js v4.0.0 | (c) 2018 Josh Johnson | https://github.com/jshjohnson/Choices#readme */
/*! choices.js v4.0.1 | (c) 2018 Josh Johnson | https://github.com/jshjohnson/Choices#readme */
(function webpackUniversalModuleDefinition(root, factory) {
//CommonJS2
if(typeof exports === 'object' && typeof module === 'object')
@ -2161,7 +2161,6 @@ var Choices = function () {
this._prevState = {};
this._currentValue = '';
this._canSearch = this.config.searchEnabled;
this._isDisabled = this.config.addItems;
this._isScrollingOnIe = false;
this._highlightPosition = 0;
this._wasTap = true;
@ -2259,39 +2258,31 @@ var Choices = function () {
}, {
key: 'enable',
value: function enable() {
if (!this._isDisabled) {
return this;
if (this.passedElement.isDisabled) {
this.passedElement.enable();
}
this.passedElement.enable();
if (this.containerOuter.isDisabled) {
this._addEventListeners();
this.input.enable();
this.containerOuter.enable();
}
this._isDisabled = false;
return this;
}
}, {
key: 'disable',
value: function disable() {
if (this._isDisabled) {
return this;
if (!this.passedElement.isDisabled) {
this.passedElement.disable();
}
this.passedElement.disable();
if (!this.containerOuter.isDisabled) {
this._removeEventListeners();
this.input.disable();
this.containerOuter.disable();
}
this._isDisabled = true;
return this;
}
}, {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long