Skip to Content
APIInterfacesInterface: StringFieldConfig<TFieldValues>

Hero Hook Form API v2.15.0


Hero Hook Form API / StringFieldConfig

Interface: StringFieldConfig<TFieldValues>

Defined in: types.ts:159 

Extends

Type Parameters

TFieldValues

TFieldValues extends FieldValues

Properties

name

name: Path<TFieldValues>

Defined in: types.ts:138 

Inherited from

BaseFormFieldConfig.name


label?

optional label: string

Defined in: types.ts:139 

Inherited from

BaseFormFieldConfig.label


description?

optional description: string

Defined in: types.ts:140 

Inherited from

BaseFormFieldConfig.description


className?

optional className: string

Defined in: types.ts:141 

Inherited from

BaseFormFieldConfig.className


isDisabled?

optional isDisabled: boolean

Defined in: types.ts:142 

Inherited from

BaseFormFieldConfig.isDisabled


rules?

optional rules: RegisterOptions<TFieldValues, Path<TFieldValues>>

Defined in: types.ts:143 

Inherited from

BaseFormFieldConfig.rules


condition()?

optional condition: (values) => boolean

Defined in: types.ts:146 

Parameters

values

Partial<TFieldValues>

Returns

boolean

Inherited from

BaseFormFieldConfig.condition


dependsOn?

optional dependsOn: Path<TFieldValues>

Defined in: types.ts:147 

Inherited from

BaseFormFieldConfig.dependsOn


dependsOnValue?

optional dependsOnValue: unknown

Defined in: types.ts:148 

Inherited from

BaseFormFieldConfig.dependsOnValue


group?

optional group: string

Defined in: types.ts:151 

Inherited from

BaseFormFieldConfig.group


ariaLabel?

optional ariaLabel: string

Defined in: types.ts:154 

Inherited from

BaseFormFieldConfig.ariaLabel


ariaDescribedBy?

optional ariaDescribedBy: string

Defined in: types.ts:155 

Inherited from

BaseFormFieldConfig.ariaDescribedBy


type

type: "input" | "select" | "textarea" | "autocomplete"

Defined in: types.ts:161 


defaultValue?

optional defaultValue: string

Defined in: types.ts:162 


inputProps?

optional inputProps: InputPassthroughProps

Defined in: types.ts:163 


textareaProps?

optional textareaProps: TextareaPassthroughProps

Defined in: types.ts:164 


selectProps?

optional selectProps: SelectPassthroughProps

Defined in: types.ts:165 


autocompleteProps?

optional autocompleteProps: AutocompletePassthroughProps

Defined in: types.ts:166 


options?

optional options: object[]

Defined in: types.ts:168 

Static options for autocomplete/select. Omit when using getOptions for dynamic items.

label

label: string

value

value: string | number


getOptions()?

optional getOptions: () => object[]

Defined in: types.ts:170 

Dynamic options for autocomplete: called each render to get current items (e.g. from API/state).

Returns

object[]


renderItem()?

optional renderItem: (item) => ReactNode

Defined in: types.ts:172 

Custom render for each autocomplete option (e.g. name + email + phone). When provided, used instead of default label-only.

Parameters

item
label

string

value

string | number

Returns

ReactNode