mirror of
https://github.com/directus/directus.git
synced 2026-01-31 15:57:57 -05:00
Add Nullable option to text-input interface
This commit is contained in:
committed by
rijkvanzanten
parent
3503b7c721
commit
d5890df4c2
@@ -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,
|
||||
},
|
||||
},
|
||||
],
|
||||
}));
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user