UNPKG

@progress/kendo-react-form

Version:

React Form is a small and fast package for form state management with zero dependencies. KendoReact Form package

58 lines (57 loc) 1.77 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2026 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import { FieldValidatorType } from './interfaces/FieldValidator.js'; import * as React from 'react'; /** @hidden */ export type FormContextType = { onSubmit: (event: React.SyntheticEvent<any>) => void; onChange: (name: string, options: { value: any; }) => void; onFocus: (name: string) => void; onBlur: (name: string) => void; onUnshift: (name: string, options: { value: any; }) => void; onPush: (name: string, options: { value: any; }) => void; onInsert: (name: string, options: { index: number; value: any; }) => void; onPop: (name: string) => any; onRemove: (name: string, options: { index: number; }) => any; onReplace: (name: string, options: { index: number; value: any; }) => void; onMove: (name: string, options: { prevIndex: number; nextIndex: number; }) => void; registerField: (name: string, validator: FieldValidatorType | FieldValidatorType[] | undefined) => void; valueGetter: (name: string) => any; errors: { [name: string]: string; }; touched: { [name: string]: boolean; }; visited: { [name: string]: boolean; }; modified: { [name: string]: boolean; }; id: string; }; /** @hidden */ export declare const FormContext: React.Context<FormContextType | null>;