Defined in: FormApi/FormApiArrayMethods.types.public.ts:90
TFormData
clearFieldValues: ClearFieldValuesFn<TFormData>;Defined in: FormApi/FormApiArrayMethods.types.public.ts:134
Clear all values from an array field. If the field is not an array, this method will be ignored.
arrayFieldName
The name of the array field
filterFieldValues: FilterFieldValuesFn<TFormData>;Defined in: FormApi/FormApiArrayMethods.types.public.ts:152
Filter the values in an array field using a predicate function. If the field is not an array, this method will be ignored.
arrayFieldName
The name of the array field
predicate
The predicate function to filter values. Returns true to keep the value, false to remove it.
options
Optional update options including a custom thisArg for the predicate
insertFieldValue: InsertFieldValueFn<TFormData>;Defined in: FormApi/FormApiArrayMethods.types.public.ts:127
Insert a value into an array field at the specified index. If the field is not an array, this method will be ignored.
arrayFieldName
The name of the array field
index
The index at which to insert the value
value
The value to insert
options
Optional update options
moveFieldValue: MoveFieldValueFn<TFormData>;Defined in: FormApi/FormApiArrayMethods.types.public.ts:108
Move a value in an array field from one index to another. If the field is not an array, this method will be ignored.
arrayFieldName
The name of the array field
fromIndex
The current index of the value to move
toIndex
The index to move the value to
options
Optional update options
pushFieldValue: PushFieldValueFn<TFormData>;Defined in: FormApi/FormApiArrayMethods.types.public.ts:117
Push a value into an array field. If the field is not an array, this method will be ignored.
arrayFieldName
The name of the array field
value
The value to push
options
Optional update options
removeFieldValue: RemoveFieldValueFn<TFormData>;Defined in: FormApi/FormApiArrayMethods.types.public.ts:143
Remove a value from an array field at the specified index. If the field is not an array, this method will be ignored.
arrayFieldName
The name of the array field
index
The index of the value to remove
options
Optional update options
swapFieldValues: SwapFieldValuesFn<TFormData>;Defined in: FormApi/FormApiArrayMethods.types.public.ts:98
Swap two values in an array field. If the field is not an array, this method will be ignored.
arrayFieldName
The name of the array field
indexA
The index of the first value to swap
indexB
The index of the second value to swap