Documents / @faasjs/ant-design / FormItemProps
Interface: FormItemProps<T>
Props for the FormItem component.
Each field can render as a single form control, a list of controls, or a nested object/object-list group of child form items.
Extends
BaseItemProps.Omit<AntdFormItemProps<T>,"id"|"children"|"render">
Extended by
Type Parameters
T
T = any
Value type rendered or edited by the form item.
Properties
children?
optionalchildren?:UnionFaasItemElement<T> |null
Generic custom element rendered when no form-specific child overrides it.
col?
optionalcol?:number
Number of columns taken by this field in the Ant Design grid.
disabled?
optionaldisabled?:boolean
Whether the field is disabled.
extendTypes?
optionalextendTypes?:ExtendTypes
Custom type renderers keyed by item type.
formChildren?
optionalformChildren?:UnionFaasItemElement<T> |null
Form-specific custom element.
formRender?
optionalformRender?:UnionFaasItemRender<T> |null
Form-specific custom render callback.
id
id:
string|number
Inherited from
if?
optionalif?: (values) =>boolean
Conditional visibility predicate. When false, the field is hidden and rendered as a hidden input.
Parameters
values
Record<string, any>
Returns
boolean
input?
optionalinput?:InputProps|RadioProps|InputNumberProps<ValueType> |SwitchProps|DatePickerProps|SelectProps<T,DefaultOptionType>
Props forwarded to the Ant Design input component used for this field.
label?
optionallabel?:string|false
Field label text, or false to hide the label.
Overrides
Omit.label
maxCount?
optionalmaxCount?:number
Maximum number of entries allowed in a list item.
object?
optionalobject?:FormItemProps<any>[]
Nested item definitions used by object and object[] item types.
onValueChange?
optionalonValueChange?: (value,values,form) =>void
Called when the field value changes.
Parameters
value
T
values
any
form
FormInstance
Returns
void
options?
optionaloptions?:BaseOption[]
Inherited from
render?
optionalrender?:UnionFaasItemRender<T> |null
Generic custom render callback.
required?
optionalrequired?:boolean
Whether the field is required. When true, a required validation rule is appended.
Overrides
Omit.required
rules?
optionalrules?:RuleObject[]
Validation rules appended to the field.
Overrides
Omit.rules
title?
optionaltitle?:string
Inherited from
type?
optionaltype?:FaasItemType
Item type that determines which Ant Design control is rendered.