mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 04:50:18 +00:00
Add resetSection action, initialize props
This commit is contained in:
+1
@@ -21,6 +21,7 @@ export interface ActionTypes {
|
||||
INITIALIZE: string;
|
||||
REGISTER_FIELD: string;
|
||||
RESET: string;
|
||||
RESET_SECTION: string;
|
||||
SET_SUBMIT_FAILED: string;
|
||||
SET_SUBMIT_SUCCEEDED: string;
|
||||
START_ASYNC_VALIDATION: string;
|
||||
|
||||
Vendored
+3
@@ -26,11 +26,14 @@ export declare function focus(form: string, field: string): FormAction;
|
||||
export interface InitializeOptions {
|
||||
keepDirty: boolean;
|
||||
keepSubmitSucceeded: boolean;
|
||||
updateUnregisteredFields: boolean;
|
||||
keepValues: boolean;
|
||||
}
|
||||
|
||||
export declare function initialize(form: string, data: any, keepDirty?: boolean | InitializeOptions, options?: InitializeOptions): FormAction;
|
||||
export declare function registerField(form: string, name: string, type: FieldType): FormAction;
|
||||
export declare function reset(form: string): FormAction;
|
||||
export declare function resetSection(form: string, ...sections: string[]): FormAction;
|
||||
export declare function startAsyncValidation(form: string): FormAction;
|
||||
export declare function stopAsyncValidation(form: string, errors?: any): FormAction;
|
||||
export declare function setSubmitFailed(form: string, ...fields: string[]): FormAction;
|
||||
|
||||
Vendored
+1
@@ -133,6 +133,7 @@ export interface FormInstance<FormData, P> extends Component<P> {
|
||||
pristine: boolean;
|
||||
registeredFields: RegisteredFieldState[];
|
||||
reset(): void;
|
||||
resetSection(...sections: string[]): void;
|
||||
submit(): Promise<any>;
|
||||
valid: boolean;
|
||||
values: Partial<FormData>;
|
||||
|
||||
Reference in New Issue
Block a user