Add Nullable option to text-input interface

This commit is contained in:
Nicola Krumschmidt
2020-12-28 01:27:02 +01:00
committed by rijkvanzanten
parent 3503b7c721
commit d5890df4c2
3 changed files with 22 additions and 0 deletions

View File

@@ -87,5 +87,20 @@ export default defineInterface(({ i18n }) => ({
default_value: false,
},
},
{
field: 'nullable',
name: i18n.t('interfaces.text-input.nullable'),
type: 'boolean',
meta: {
width: 'half',
interface: 'toggle',
options: {
label: i18n.t('interfaces.text-input.nullable_label'),
},
},
schema: {
default_value: true,
},
},
],
}));

View File

@@ -1,6 +1,7 @@
<template>
<v-input
:value="value"
:nullable="nullable"
:placeholder="placeholder"
:disabled="disabled"
:trim="trim"
@@ -38,6 +39,10 @@ export default defineComponent({
type: String,
default: null,
},
nullable: {
type: Boolean,
default: true,
},
disabled: {
type: Boolean,
default: false,

View File

@@ -917,6 +917,8 @@ interfaces:
trim_label: Trim the start and end
mask: Masked
mask_label: Hide the real value
nullable: Nullable
nullable_label: Send NULL as empty
textarea:
textarea: Textarea
description: Enter multiline plain-text