type ClearFieldValuesFn<TFormData> = <TFieldName>(arrayFieldName, options?) => void;Defined in: FormApi/FormApiArrayMethods.types.public.ts:218
Removes every element from an array field.
A runtime value that is not an array produces a warning and is left 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.
Controls metadata updates and whether validation runs.
void
// items: ['first', 'second']
formApi.clearFieldValues('items')
// items: []