fix change field type issue for select field (#74)
This commit is contained in:
@@ -426,6 +426,10 @@ export default {
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
onChangeType(newType) {
|
onChangeType(newType) {
|
||||||
|
if(['select', 'multi_select'].includes(this.field.type)){
|
||||||
|
this.$set(this.field, newType, this.field[this.field.type]) // Set new options with new type
|
||||||
|
this.$delete(this.field, this.field.type) // remove old type options
|
||||||
|
}
|
||||||
this.$set(this.field, 'type', newType)
|
this.$set(this.field, 'type', newType)
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
|
|||||||
Reference in New Issue
Block a user