fix select input options (#550)

This commit is contained in:
Chirag Chhatrala 2024-08-30 18:09:03 +05:30 committed by GitHub
parent 3d2d485512
commit 6d4b5b8ff4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -295,6 +295,7 @@
Advanced options for your select/multiselect fields.
</p>
<text-area-input
v-model="optionsText"
:name="field.id + '_options_text'"
class="mt-3"
label="Set selection options"
@ -658,6 +659,9 @@ export default {
mbLimit() {
return (this.form?.workspace && this.form?.workspace.max_file_size) ? this.form?.workspace?.max_file_size : 10
},
optionsText() {
return this.field[this.field.type].options.map(option => option.name).join('\n')
},
prefillSelectsOptions() {
if (!['select', 'multi_select'].includes(this.field.type)) return {}