Version 4.0.6

This commit is contained in:
Josh Johnson 2018-10-30 22:10:21 +00:00
parent 6f2bf5770b
commit cd165deb3c
4 changed files with 14 additions and 11 deletions

View file

@ -1,4 +1,4 @@
/*! choices.js v4.0.5 | (c) 2018 Josh Johnson | https://github.com/jshjohnson/Choices#readme */ /*! choices.js v4.0.6 | (c) 2018 Josh Johnson | https://github.com/jshjohnson/Choices#readme */
(function webpackUniversalModuleDefinition(root, factory) { (function webpackUniversalModuleDefinition(root, factory) {
//CommonJS2 //CommonJS2
if(typeof exports === 'object' && typeof module === 'object') if(typeof exports === 'object' && typeof module === 'object')
@ -2219,6 +2219,7 @@ var Choices = function () {
this._createTemplates(); this._createTemplates();
this._createElements(); this._createElements();
this._createStructure(); this._createStructure();
// Set initial state (We need to clone the state because some reducers // Set initial state (We need to clone the state because some reducers
// modify the inner objects properties in the state) 🤢 // modify the inner objects properties in the state) 🤢
this._initialState = (0, _utils.cloneObject)(this._store.state); this._initialState = (0, _utils.cloneObject)(this._store.state);
@ -2226,6 +2227,12 @@ var Choices = function () {
this._render(); this._render();
this._addEventListeners(); this._addEventListeners();
var shouldDisable = !this.config.addItems || this.passedElement.element.hasAttribute('disabled');
if (shouldDisable) {
this.disable();
}
this.initialised = true; this.initialised = true;
var callbackOnInit = this.config.callbackOnInit; var callbackOnInit = this.config.callbackOnInit;
@ -3972,10 +3979,6 @@ var Choices = function () {
this.input.setWidth(true); this.input.setWidth(true);
} }
if (!this.config.addItems || this.passedElement.element.hasAttribute('disabled')) {
this.disable();
}
this.containerOuter.element.appendChild(this.containerInner.element); this.containerOuter.element.appendChild(this.containerInner.element);
this.containerOuter.element.appendChild(this.dropdown.element); this.containerOuter.element.appendChild(this.dropdown.element);
this.containerInner.element.appendChild(this.itemList.element); this.containerInner.element.appendChild(this.itemList.element);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -16,7 +16,7 @@
<meta name="theme-color" content="#ffffff"> <meta name="theme-color" content="#ffffff">
<!-- Ignore these --> <!-- Ignore these -->
<link rel="stylesheet" href="assets/styles/base.min.css?version=4.0.5"> <link rel="stylesheet" href="assets/styles/base.min.css?version=4.0.6">
<!-- End ignore these --> <!-- End ignore these -->
<!-- Optional includes --> <!-- Optional includes -->
@ -24,8 +24,8 @@
<!-- End optional includes --> <!-- End optional includes -->
<!-- Choices includes --> <!-- Choices includes -->
<link rel="stylesheet" href="assets/styles/choices.min.css?version=4.0.5"> <link rel="stylesheet" href="assets/styles/choices.min.css?version=4.0.6">
<script src="assets/scripts/choices.min.js?version=4.0.5"></script> <script src="assets/scripts/choices.min.js?version=4.0.6"></script>
<!-- End Choices includes --> <!-- End Choices includes -->
<!--[if lt IE 9]> <!--[if lt IE 9]>