fielder
Version:
A field-first form library for React and React Native
13 lines (12 loc) • 483 B
TypeScript
import { ActionHandler } from './util';
import { FormSchemaType, SetStateAction } from '../types';
export declare type SetFieldValueAction = {
type: 'SET_FIELD_VALUE';
config: SetFieldValueArgs<any, any>;
};
export declare type SetFieldValueArgs<T extends FormSchemaType, K extends keyof T> = {
name: K;
value: SetStateAction<T[K]>;
};
/** Triggers a change to the given field. */
export declare const doSetFieldValue: ActionHandler<SetFieldValueAction>;