FaasJS
Home
  • Guide
  • Documents
  • Templates
  • Changelog
  • Ecosystem

    • Docker Images
  • Github
  • Contributing
  • Sponsor
  • Security
Home
  • Guide
  • Documents
  • Templates
  • Changelog
  • Ecosystem

    • Docker Images
  • Github
  • Contributing
  • Sponsor
  • Security

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

  • UnionFaasItemProps

Type Parameters

T

T = any

Value type rendered or edited by the form item.

Properties

children?

optional children?: UnionFaasItemElement<T> | null

Generic custom element rendered when no form-specific child overrides it.

col?

optional col?: number

Number of columns taken by this field in the Ant Design grid.

disabled?

optional disabled?: boolean

Whether the field is disabled.

extendTypes?

optional extendTypes?: ExtendTypes

Custom type renderers keyed by item type.

formChildren?

optional formChildren?: UnionFaasItemElement<T> | null

Form-specific custom element.

formRender?

optional formRender?: UnionFaasItemRender<T> | null

Form-specific custom render callback.

id

id: string | number

Inherited from

BaseItemProps.id

if?

optional if?: (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?

optional input?: InputProps | RadioProps | InputNumberProps<ValueType> | SwitchProps | DatePickerProps | SelectProps<T, DefaultOptionType>

Props forwarded to the Ant Design input component used for this field.

label?

optional label?: string | false

Field label text, or false to hide the label.

Overrides

Omit.label

maxCount?

optional maxCount?: number

Maximum number of entries allowed in a list item.

object?

optional object?: FormItemProps<any>[]

Nested item definitions used by object and object[] item types.

onValueChange?

optional onValueChange?: (value, values, form) => void

Called when the field value changes.

Parameters

value

T

values

any

form

FormInstance

Returns

void

options?

optional options?: BaseOption[]

Inherited from

BaseItemProps.options

render?

optional render?: UnionFaasItemRender<T> | null

Generic custom render callback.

required?

optional required?: boolean

Whether the field is required. When true, a required validation rule is appended.

Overrides

Omit.required

rules?

optional rules?: RuleObject[]

Validation rules appended to the field.

Overrides

Omit.rules

title?

optional title?: string

Inherited from

BaseItemProps.title

type?

optional type?: FaasItemType

Item type that determines which Ant Design control is rendered.