@danielgindi/selectbox 2.0.30 → 2.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/lib.es6.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @danielgindi/selectbox 2.0.30
2
+ * @danielgindi/selectbox 2.0.32
3
3
  * git://github.com/danielgindi/selectbox.git
4
4
  */
5
5
  import { createElement, closestUntil, setElementAttrs, next, prev } from '@danielgindi/dom-utils/lib/Dom';
@@ -3616,7 +3616,7 @@ class SelectBox {
3616
3616
  p.multiItemEls = [];
3617
3617
 
3618
3618
  this.enable(!p.disabled);
3619
- this.setReadOnly(!p.readOnly);
3619
+ this.setReadOnly(p.readOnly);
3620
3620
 
3621
3621
  this._setupDropdownMenu();
3622
3622
 
@@ -6184,10 +6184,10 @@ class SelectBox {
6184
6184
  toggleClass(p.el, `${p.baseClassName}__has_selection`, p.selectedValues.length > 0);
6185
6185
 
6186
6186
  if (p.searchable) {
6187
- if (p.input) p.input.readOnly = false;
6187
+ if (p.input) p.input.readOnly = p.readOnly;
6188
6188
  p.el.classList.add(`${p.baseClassName}__searchable`);
6189
6189
  } else {
6190
- if (p.input) p.input.readOnly = p.readOnly;
6190
+ if (p.input) p.input.readOnly = true;
6191
6191
  p.el.classList.remove(`${p.baseClassName}__searchable`);
6192
6192
  }
6193
6193