Files
baserow/web-frontend/modules/database/components/view/form/FormViewFieldOptionsAllowedSelectOptions.vue
716d43a9a8 Nuxt 3 migration (#4342)
Update the nuxt3 version.

Co-authored-by: Jonathan Adeline <jonathan@baserow.io>
Co-authored-by: Bram Wiepjes <bramw@protonmail.com>
Co-authored-by: Cezary <cezary@baserow.io>
Co-authored-by: Tsering Paljor <tsering@baserow.io>
Co-authored-by: Przemyslaw Kukulski <przemyslaw+gh@baserow.io>
Co-authored-by: Bram <bram2w@users.noreply.github.com>
2026-01-22 10:27:19 +01:00

63 lines
1.5 KiB
Vue

<template>
<div>
<SwitchInput
class="margin-bottom-1"
small
:value="fieldOptions.include_all_select_options"
:disabled="readOnly"
@input="
$emit('updated-field-options', {
include_all_select_options: $event,
})
"
>{{ $t('formViewField.includeAllSelectOptions') }}</SwitchInput
>
<div
v-if="!fieldOptions.include_all_select_options"
class="form-view__allowed-select-options"
>
<FormGroup
small-label
required
:helper-text="$t('formViewField.includeAllSelectOptionsHelper')"
>
<FieldSelectOptionsDropdown
:value="fieldOptions.allowed_select_options"
:options="field.select_options"
:multiple="true"
:show-empty-value="false"
@input="
$emit('updated-field-options', {
allowed_select_options: $event,
})
"
></FieldSelectOptionsDropdown>
</FormGroup>
</div>
</div>
</template>
<script>
import FieldSelectOptionsDropdown from '@baserow/modules/database/components/field/FieldSelectOptionsDropdown'
export default {
name: 'FormViewFieldOptionsAllowedSelectOptions',
components: { FieldSelectOptionsDropdown },
props: {
readOnly: {
type: Boolean,
required: true,
},
field: {
type: Object,
required: true,
},
fieldOptions: {
type: Object,
required: true,
},
},
emits: ['updated-field-options'],
}
</script>