Use dropdown for boolean default value

This commit is contained in:
rijkvanzanten
2020-11-11 16:10:33 -05:00
parent ef901218a5
commit ae0fcc28fe
4 changed files with 31 additions and 13 deletions

View File

@@ -52,7 +52,9 @@
:disabled="item.disabled"
@click="multiple ? null : $emit('input', item.value)"
>
<v-list-item-icon v-if="multiple === false && allowOther === false && itemIcon !== null && item.icon">
<v-list-item-icon
v-if="multiple === false && allowOther === false && itemIcon !== null && item.icon"
>
<v-icon :name="item.icon" />
</v-list-item-icon>
<v-list-item-content>
@@ -119,8 +121,8 @@
<script lang="ts">
import { defineComponent, PropType, computed, toRefs, Ref } from '@vue/composition-api';
import i18n from '@/lang';
import { useCustomSelection, useCustomSelectionMultiple } from '@/composables/use-custom-selection';
import i18n from '../../lang';
import { useCustomSelection, useCustomSelectionMultiple } from '../../composables/use-custom-selection';
type Item = {
text: string;
@@ -150,7 +152,7 @@ export default defineComponent({
default: null,
},
value: {
type: [Array, String, Number] as PropType<InputValue>,
type: [Array, String, Number, Boolean] as PropType<InputValue>,
default: null,
},
multiple: {