@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.cjs.js +4 -4
- package/dist/lib.cjs.js.map +1 -1
- package/dist/lib.cjs.min.js +2 -2
- package/dist/lib.cjs.min.js.map +1 -1
- package/dist/lib.es6.js +4 -4
- package/dist/lib.es6.js.map +1 -1
- package/dist/lib.es6.min.js +2 -2
- package/dist/lib.es6.min.js.map +1 -1
- package/dist/lib.umd.js +4 -4
- package/dist/lib.umd.js.map +1 -1
- package/dist/lib.umd.min.js +2 -2
- package/dist/lib.umd.min.js.map +1 -1
- package/lib/SelectBox.js +3 -3
- package/package.json +1 -1
- package/vue/SelectBox.vue +3 -11
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(
|
|
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 =
|
|
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 =
|
|
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
package/vue/SelectBox.vue
CHANGED
|
@@ -43,10 +43,7 @@ export const PropTypes = {
|
|
|
43
43
|
readOnly: {
|
|
44
44
|
type: Boolean,
|
|
45
45
|
required: false,
|
|
46
|
-
|
|
47
|
-
readonly: { // compatibility with simple readonly attr of inputs
|
|
48
|
-
type: Boolean,
|
|
49
|
-
required: false,
|
|
46
|
+
default: null,
|
|
50
47
|
},
|
|
51
48
|
clearable: {
|
|
52
49
|
type: Boolean,
|
|
@@ -482,12 +479,7 @@ export default {
|
|
|
482
479
|
|
|
483
480
|
readOnly() {
|
|
484
481
|
if (this.nonReactive.instance)
|
|
485
|
-
this.nonReactive.instance.setReadOnly(this.readOnly ??
|
|
486
|
-
},
|
|
487
|
-
|
|
488
|
-
readonly() {
|
|
489
|
-
if (this.nonReactive.instance)
|
|
490
|
-
this.nonReactive.instance.setReadOnly(this.readOnly ?? this.readonly ?? false);
|
|
482
|
+
this.nonReactive.instance.setReadOnly(this.readOnly ?? false);
|
|
491
483
|
},
|
|
492
484
|
|
|
493
485
|
clearable(value) {
|
|
@@ -819,7 +811,7 @@ export default {
|
|
|
819
811
|
baseClass: this.baseClass,
|
|
820
812
|
direction: this.direction,
|
|
821
813
|
disabled: this.disabled,
|
|
822
|
-
readOnly: this.readOnly ??
|
|
814
|
+
readOnly: this.readOnly ?? false,
|
|
823
815
|
clearable: this.clearable,
|
|
824
816
|
hasOpenIndicator: this.hasOpenIndicator,
|
|
825
817
|
placeholder: this.placeholder,
|