本页还没有译文
本页 131 段还没译成日本語,下面显示的是英文原文。FormState
还没翻译译自英文(tanstack.com)本页 131 段都还没译
Defined in: packages/form-core/src/FormApi.ts:793
An object representing the current state of the form.
Extends
BaseFormState<TFormData,TOnMount,TOnChange,TOnChangeAsync,TOnBlur,TOnBlurAsync,TOnSubmit,TOnSubmitAsync,TOnDynamic,TOnDynamicAsync,TOnServer>.DerivedFormState<TFormData,TOnMount,TOnChange,TOnChangeAsync,TOnBlur,TOnBlurAsync,TOnSubmit,TOnSubmitAsync,TOnDynamic,TOnDynamicAsync,TOnServer>
Type Parameters
TFormData
TFormData
TOnMount
TOnMount extends undefined | FormValidateOrFn<TFormData>
TOnChange
TOnChange extends undefined | FormValidateOrFn<TFormData>
TOnChangeAsync
TOnChangeAsync extends undefined | FormAsyncValidateOrFn<TFormData>
TOnBlur
TOnBlur extends undefined | FormValidateOrFn<TFormData>
TOnBlurAsync
TOnBlurAsync extends undefined | FormAsyncValidateOrFn<TFormData>
TOnSubmit
TOnSubmit extends undefined | FormValidateOrFn<TFormData>
TOnSubmitAsync
TOnSubmitAsync extends undefined | FormAsyncValidateOrFn<TFormData>
TOnDynamic
TOnDynamic extends undefined | FormValidateOrFn<TFormData>
TOnDynamicAsync
TOnDynamicAsync extends undefined | FormAsyncValidateOrFn<TFormData>
TOnServer
TOnServer extends undefined | FormAsyncValidateOrFn<TFormData>
Properties
_force_re_eval?
optional _force_re_eval: boolean;Defined in: packages/form-core/src/FormApi.ts:696
@private, used to force a re-evaluation of the form state when options change
Inherited from
BaseFormState._force_re_evalcanSubmit
canSubmit: boolean;Defined in: packages/form-core/src/FormApi.ts:786
A boolean indicating if the form can be submitted based on its current state.
Inherited from
DerivedFormState.canSubmiterrorMap
errorMap: ValidationErrorMap<UnwrapFormValidateOrFn<TOnMount>, UnwrapFormValidateOrFn<TOnChange>, UnwrapFormAsyncValidateOrFn<TOnChangeAsync>, UnwrapFormValidateOrFn<TOnBlur>, UnwrapFormAsyncValidateOrFn<TOnBlurAsync>, UnwrapFormValidateOrFn<TOnSubmit>, UnwrapFormAsyncValidateOrFn<TOnSubmitAsync>, UnwrapFormValidateOrFn<TOnDynamic>, UnwrapFormAsyncValidateOrFn<TOnDynamicAsync>, UnwrapFormAsyncValidateOrFn<TOnServer>>;Defined in: packages/form-core/src/FormApi.ts:633
The error map for the form itself.
Inherited from
BaseFormState.errorMaperrors
errors: NonNullable<
| UnwrapFormValidateOrFn<TOnMount>
| UnwrapFormValidateOrFn<TOnChange>
| UnwrapFormAsyncValidateOrFn<TOnChangeAsync>
| UnwrapFormValidateOrFn<TOnBlur>
| UnwrapFormAsyncValidateOrFn<TOnBlurAsync>
| UnwrapFormValidateOrFn<TOnSubmit>
| UnwrapFormAsyncValidateOrFn<TOnSubmitAsync>
| UnwrapFormValidateOrFn<TOnDynamic>
| UnwrapFormAsyncValidateOrFn<TOnDynamicAsync>
| UnwrapFormAsyncValidateOrFn<TOnServer>>[];Defined in: packages/form-core/src/FormApi.ts:737
The error array for the form itself.
Inherited from
DerivedFormState.errorsfieldMeta
fieldMeta: Partial<Record<DeepKeys<TFormData>, AnyFieldLikeMeta>>;Defined in: packages/form-core/src/FormApi.ts:790
A record of field metadata for each field in the form.
Inherited from
DerivedFormState.fieldMetafieldMetaBase
fieldMetaBase: Partial<Record<DeepKeys<TFormData>, AnyFieldLikeMetaBase>>;Defined in: packages/form-core/src/FormApi.ts:652
A record of field metadata for each field in the form, not including the derived properties, like errors and such
Inherited from
BaseFormState.fieldMetaBaseformGroupStateBase
formGroupStateBase: Partial<Record<string, FormGroupState>>;Defined in: packages/form-core/src/FormApi.ts:659
A record of submission lifecycle state for each mounted FormGroupApi,
keyed by the group's fully-qualified field name. Stored on the form so
group-level state can be read from FormApi without having to walk the
mounted group instances.
Inherited from
BaseFormState.formGroupStateBaseisBlurred
isBlurred: boolean;Defined in: packages/form-core/src/FormApi.ts:766
A boolean indicating if any of the form fields have been blurred.
Inherited from
DerivedFormState.isBlurredisDefaultValue
isDefaultValue: boolean;Defined in: packages/form-core/src/FormApi.ts:778
A boolean indicating if all of the form's fields are the same as default values.
Inherited from
DerivedFormState.isDefaultValueisDirty
isDirty: boolean;Defined in: packages/form-core/src/FormApi.ts:770
A boolean indicating if any of the form's fields' values have been modified by the user. Evaluates true if the user have modified at least one of the fields. Opposite of isPristine.
Inherited from
DerivedFormState.isDirtyisFieldsValid
isFieldsValid: boolean;Defined in: packages/form-core/src/FormApi.ts:758
A boolean indicating if all the form fields are valid. Evaluates true if there are no field errors.
Inherited from
DerivedFormState.isFieldsValidisFieldsValidating
isFieldsValidating: boolean;Defined in: packages/form-core/src/FormApi.ts:754
A boolean indicating if any of the form fields are currently validating.
Inherited from
DerivedFormState.isFieldsValidatingisFormValid
isFormValid: boolean;Defined in: packages/form-core/src/FormApi.ts:733
A boolean indicating if the form is valid.
Inherited from
DerivedFormState.isFormValidisFormValidating
isFormValidating: boolean;Defined in: packages/form-core/src/FormApi.ts:729
A boolean indicating if the form is currently validating.
Inherited from
DerivedFormState.isFormValidatingisPristine
isPristine: boolean;Defined in: packages/form-core/src/FormApi.ts:774
A boolean indicating if none of the form's fields' values have been modified by the user. Evaluates true if the user have not modified any of the fields. Opposite of isDirty.
Inherited from
DerivedFormState.isPristineisSubmitSuccessful
isSubmitSuccessful: boolean;Defined in: packages/form-core/src/FormApi.ts:692
A boolean indicating if the last submission was successful.
Inherited from
BaseFormState.isSubmitSuccessfulisSubmitted
isSubmitted: boolean;Defined in: packages/form-core/src/FormApi.ts:680
A boolean indicating if the onSubmit function has completed successfully.
Goes back to false at each new submission attempt.
Note: you can use isSubmitting to check if the form is currently submitting.
Inherited from
BaseFormState.isSubmittedisSubmitting
isSubmitting: boolean;Defined in: packages/form-core/src/FormApi.ts:672
A boolean indicating if the form is currently in the process of being submitted after handleSubmit is called.
Goes back to false when submission completes for one of the following reasons:
- the validation step returned errors.
- the
onSubmitfunction has completed.
Note: if you're running async operations in your onSubmit function make sure to await them to ensure isSubmitting is set to false only when the async operation completes.
This is useful for displaying loading indicators or disabling form inputs during submission.
Inherited from
BaseFormState.isSubmittingisTouched
isTouched: boolean;Defined in: packages/form-core/src/FormApi.ts:762
A boolean indicating if any of the form fields have been touched.
Inherited from
DerivedFormState.isTouchedisValid
isValid: boolean;Defined in: packages/form-core/src/FormApi.ts:782
A boolean indicating if the form and all its fields are valid. Evaluates true if there are no errors.
Inherited from
DerivedFormState.isValidisValidating
isValidating: boolean;Defined in: packages/form-core/src/FormApi.ts:684
A boolean indicating if the form or any of its fields are currently validating.
Inherited from
BaseFormState.isValidatingsubmissionAttempts
submissionAttempts: number;Defined in: packages/form-core/src/FormApi.ts:688
A counter for tracking the number of submission attempts.
Inherited from
BaseFormState.submissionAttemptsvalidationMetaMap
validationMetaMap: Record<ValidationErrorMapKeys, ValidationMeta | undefined>;Defined in: packages/form-core/src/FormApi.ts:648
An internal mechanism used for keeping track of validation logic in a form.
Inherited from
BaseFormState.validationMetaMapvalues
values: TFormData;Defined in: packages/form-core/src/FormApi.ts:629
The current values of the form fields.
Inherited from
BaseFormState.values