Phone Input - option for simple text input (#207)

Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
formsdev
2023-09-20 15:44:08 +05:30
committed by GitHub
parent 6529907f2c
commit 4c56e8ba85
6 changed files with 27 additions and 7 deletions

View File

@@ -43,7 +43,7 @@ export default {
checkbox: 'CheckboxInput',
url: 'TextInput',
email: 'TextInput',
phone_number: 'PhoneInput'
phone_number: 'TextInput'
}
}
},
@@ -57,6 +57,10 @@ export default {
required: true
}
if (this.property.type === 'phone_number' && !this.property.use_simple_text_input) {
componentData.component = 'PhoneInput'
}
if (['select', 'multi_select'].includes(this.property.type)) {
componentData.multiple = false;
componentData.options = this.property[this.property.type].options.map(option => {