@danielgindi/selectbox 2.0.31 → 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/lib/SelectBox.js CHANGED
@@ -306,7 +306,7 @@ class SelectBox {
306
306
  p.multiItemEls = [];
307
307
 
308
308
  this.enable(!p.disabled);
309
- this.setReadOnly(!p.readOnly);
309
+ this.setReadOnly(p.readOnly);
310
310
 
311
311
  this._setupDropdownMenu();
312
312
 
@@ -2874,10 +2874,10 @@ class SelectBox {
2874
2874
  toggleClass(p.el, `${p.baseClassName}__has_selection`, p.selectedValues.length > 0);
2875
2875
 
2876
2876
  if (p.searchable) {
2877
- if (p.input) p.input.readOnly = false;
2877
+ if (p.input) p.input.readOnly = p.readOnly;
2878
2878
  p.el.classList.add(`${p.baseClassName}__searchable`);
2879
2879
  } else {
2880
- if (p.input) p.input.readOnly = p.readOnly;
2880
+ if (p.input) p.input.readOnly = true;
2881
2881
  p.el.classList.remove(`${p.baseClassName}__searchable`);
2882
2882
  }
2883
2883
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danielgindi/selectbox",
3
- "version": "2.0.31",
3
+ "version": "2.0.32",
4
4
  "description": "A collection of dom utilities. So you can work natively with the dom without dom frameworks.",
5
5
  "main": "dist/lib.cjs.min.js",
6
6
  "module": "lib/index.js",