inertia-bootstrap-forms 1.0.74 → 1.0.75
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/{index-CfaVS7a7.js → index-Dfg9Yk-z.js} +10 -2
- package/dist/{index-D2faHans.js → index-DpghCC9Y.js} +1 -1
- package/dist/inertia-bootstrap-forms.es.js +1 -1
- package/dist/inertia-bootstrap-forms.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/EditorInput.vue +4 -0
- package/src/Select2Input.vue +13 -1
package/package.json
CHANGED
package/src/EditorInput.vue
CHANGED
package/src/Select2Input.vue
CHANGED
|
@@ -88,8 +88,20 @@ export default defineComponent({
|
|
|
88
88
|
return (typeof this.modelValue == 'object') ? Object.values(this.modelValue) : (this.modelValue ? [this.modelValue] : null)
|
|
89
89
|
}
|
|
90
90
|
},
|
|
91
|
+
watch: {
|
|
92
|
+
'options': {
|
|
93
|
+
handler: function (val, old) {
|
|
94
|
+
setTimeout(() => this.init(), 300);
|
|
95
|
+
},
|
|
96
|
+
deep: true
|
|
97
|
+
}
|
|
98
|
+
},
|
|
91
99
|
methods: {
|
|
92
100
|
init() {
|
|
101
|
+
if (this.choices) {
|
|
102
|
+
this.destroy();
|
|
103
|
+
}
|
|
104
|
+
|
|
93
105
|
this.choices = new Choices(this.$refs.input, {
|
|
94
106
|
searchEnabled: (this.searchEnabled || !!this.search?.url),
|
|
95
107
|
searchChoices: (this.searchEnabled && !this.search?.url),
|
|
@@ -126,7 +138,7 @@ export default defineComponent({
|
|
|
126
138
|
);
|
|
127
139
|
},
|
|
128
140
|
async doSearch(searchTerm) {
|
|
129
|
-
if(!this.search?.url) return;
|
|
141
|
+
if (!this.search?.url) return;
|
|
130
142
|
|
|
131
143
|
await this.setLoading();
|
|
132
144
|
|