react-browser-form
Version:
<div align="center"> <a href="https://deniskabana.github.io/react-browser-form/introduction" title="React Browser Form - Form management in React made simple for browsers."> <img src="https://raw.githubusercontent.com/deniskabana/react-browser-form/
20 lines (19 loc) • 1 kB
TypeScript
import { DataFlowEvent, BrowserFormOptions, BrowserFormReturnType } from "../types";
export declare const DEBUG_CHANGE_EVENT = "rdf_debug_change";
export interface DebugData<Schema> {
/** All of the returned data - includes listeners, isDirty, errors, names, etc. */
returnData: BrowserFormReturnType<Schema>;
/** The reason for change the event handlers provide */
changeReason?: string;
/** React browser form's internal data flow event - includes source and type of the event */
event?: DataFlowEvent<Schema>;
/** Updated formState after event transformations */
formState?: Schema;
/** Whether the form has already been submitted */
isSubmitted?: boolean;
}
/**
* Set debug data - useful for docs, testing, debugging and understanding the data flow
* **NEVER USE THIS FOR ANYTHING ELSE.**
*/
export declare function setDebugData<Schema>(data: Partial<DebugData<Schema>>, options: BrowserFormOptions<any>, shouldDispatch?: boolean): void;