Defined in: FormApi/FormApi.public.ts:304
TFormData
TFormErrorTypes extends FormErrorTypes
atom: ReadonlyAtom<FormState<TFormData, TFormErrorTypes>>;Defined in: FormApi/FormApi.public.ts:309
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
FormApiArrayMethods.clearFieldValues
readonly defaultValues: TFormData;Defined in: FormApi/FormApi.public.ts:312
The current baseline values used by reset() and isDefaultValue.
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
FormApiArrayMethods.filterFieldValues
readonly formId: string;Defined in: FormApi/FormApi.public.ts:313
getFieldValue: GetFieldValueFn<TFormData>;Defined in: FormApi/FormApiFieldMethods.types.public.ts:37
TODO
DeepKeys
FormApiFieldMethods.getFieldValue
handleSubmit: () => Promise<FormValidationError<TFormData>[]>;Defined in: FormApi/FormApi.public.ts:330
TODO for later: submit meta
Promise<FormValidationError<TFormData>[]>
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
FormApiArrayMethods.insertFieldValue
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
FormApiArrayMethods.moveFieldValue
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
FormApiArrayMethods.pushFieldValue
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
FormApiArrayMethods.removeFieldValue
reset: (values?, opts?) => void;Defined in: FormApi/FormApi.public.ts:342
Reset form values, metadata, validation state, and mounted fields.
reset() restores the current defaultValues.
reset(values) sets the current values and also updates defaultValues to those values.
reset(values, { updateDefaultValues: false }) sets the current values while preserving the previous defaultValues baseline.
TFormData
void
resetField: ResetFieldFn<TFormData>;Defined in: FormApi/FormApiFieldMethods.types.public.ts:39
FormApiFieldMethods.resetField
setFieldValue: SetFieldValueFn<TFormData>;Defined in: FormApi/FormApiFieldMethods.types.public.ts:30
TODO
DeepKeys
updater
FormApiFieldMethods.setFieldValue
readonly state: FormState<TFormData, TFormErrorTypes>;Defined in: FormApi/FormApi.public.ts:310
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
FormApiArrayMethods.swapFieldValues
validate: (signal) => Promise<FormValidationError<TFormData>[]>;Defined in: FormApi/FormApi.public.ts:322
TODO expand on it
Validates with the given validation signal and returns errors if they appeared. It will automatically populate the form's error state.
Promise<FormValidationError<TFormData>[]>