Fix no options on interfaces

This commit is contained in:
rijkvanzanten
2020-06-11 17:58:04 -04:00
parent 59e87bb992
commit 8083ea3277
2 changed files with 17 additions and 10 deletions

View File

@@ -158,6 +158,7 @@
"dropdown_multiple": "Dropdown (Multiple)",
"notice": "Notice",
"slug": "Slug",
"repeater": "Repeater",
"months": {
"january": "January",

View File

@@ -4,17 +4,23 @@
<v-fancy-select :items="items" :value="value.interface" @input="emitValue('interface', $event)" />
<v-form
v-if="selectedInterface && selectedInterface.options && Array.isArray(selectedInterface.options)"
:fields="selectedInterface.options"
primary-key="+"
:edits="value.options"
@input="emitValue('options', $event)"
/>
<template v-if="selectedInterface">
<v-form
v-if="
selectedInterface.options &&
Array.isArray(selectedInterface.options) &&
selectedInterface.options.length > 0
"
:fields="selectedInterface.options"
primary-key="+"
:edits="value.options"
@input="emitValue('options', $event)"
/>
<v-notice v-else>
{{ $t('no_options_available') }}
</v-notice>
<v-notice v-else>
{{ $t('no_options_available') }}
</v-notice>
</template>
</div>
</template>