fix change field type issue for select field (#74)

This commit is contained in:
Chirag 2023-01-25 14:24:56 +05:30 committed by GitHub
parent 679e61d59e
commit 6ac68a29e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -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() {