type RemoveFieldValueFn<TFormData> = <TFieldName>(arrayFieldName, index, options?) => void;Defined in: FormApi/FormApiArrayMethods.types.public.ts:247
Removes an element from an array field.
An invalid index or a runtime value that is not an array produces a warning and leaves the value unchanged.
By default, the update marks the array field as touched and dirty, notifies change listeners, and runs change validation.
TFormData
Library-managed. Do not specify explicitly.
TFieldName extends ArrayFieldName<TFormData>
Library-managed. Do not specify explicitly.
TFieldName
The array field path.
number
The index to remove, from 0 through array.length - 1.
Controls metadata updates and whether validation runs.
void
// items: ['first', 'second', 'third']
formApi.removeFieldValue('items', 1)
// items: ['first', 'third']