Hero Hook Form API / StringArrayFieldConfig
Interface: StringArrayFieldConfig<TFieldValues>
Defined in: types.ts:243
Extends
BaseFormFieldConfig<TFieldValues>
Type Parameters
TFieldValues
TFieldValues extends FieldValues
Properties
name
name:
Path<TFieldValues>
Defined in: types.ts:138
Inherited from
label?
optionallabel:string
Defined in: types.ts:139
Inherited from
description?
optionaldescription:string
Defined in: types.ts:140
Inherited from
BaseFormFieldConfig.description
className?
optionalclassName:string
Defined in: types.ts:141
Inherited from
isDisabled?
optionalisDisabled:boolean
Defined in: types.ts:142
Inherited from
BaseFormFieldConfig.isDisabled
rules?
optionalrules:RegisterOptions<TFieldValues,Path<TFieldValues>>
Defined in: types.ts:143
Inherited from
condition()?
optionalcondition: (values) =>boolean
Defined in: types.ts:146
Parameters
values
Partial<TFieldValues>
Returns
boolean
Inherited from
dependsOn?
optionaldependsOn:Path<TFieldValues>
Defined in: types.ts:147
Inherited from
dependsOnValue?
optionaldependsOnValue:unknown
Defined in: types.ts:148
Inherited from
BaseFormFieldConfig.dependsOnValue
group?
optionalgroup:string
Defined in: types.ts:151
Inherited from
ariaLabel?
optionalariaLabel:string
Defined in: types.ts:154
Inherited from
ariaDescribedBy?
optionalariaDescribedBy:string
Defined in: types.ts:155
Inherited from
BaseFormFieldConfig.ariaDescribedBy
type
type:
"stringArray"
Defined in: types.ts:245
defaultValue?
optionaldefaultValue:string[]
Defined in: types.ts:246
stringArrayProps?
optionalstringArrayProps:object
Defined in: types.ts:247
placeholder?
optionalplaceholder:string
Placeholder text for the input
maxItems?
optionalmaxItems:number
Maximum number of items allowed
minItems?
optionalminItems:number
Minimum number of items required
allowDuplicates?
optionalallowDuplicates:boolean
Allow duplicate values
validateItem()?
optionalvalidateItem: (item) =>string|true
Custom validation function for each item
Parameters
item
string
Returns
string | true
transformItem()?
optionaltransformItem: (item) =>string
Transform item before adding (e.g., trim whitespace)
Parameters
item
string
Returns
string
renderChip()?
optionalrenderChip: (item,onRemove) =>ReactNode
Custom chip render function
Parameters
item
string
onRemove
() => void
Returns
ReactNode
addButtonText?
optionaladdButtonText:string
Custom add button text
showAddButton?
optionalshowAddButton:boolean
Whether to show add button or use enter key
readOnly?
optionalreadOnly:boolean
When true, only display items: no input, no add button, no remove buttons