extended-dynamic-forms
Version:
Extended React JSON Schema Form (RJSF) v6 with custom components, widgets, templates, layouts, and form events
20 lines (18 loc) • 686 B
TypeScript
import { default as React, ReactNode } from 'react';
import { FormEventHub } from './FormEventHub';
export interface FormEventContextType {
eventHub: FormEventHub;
formData?: any;
}
export interface FormEventProviderProps {
eventHub: FormEventHub;
formData?: any;
children: ReactNode;
}
export declare const FormEventProvider: React.FC<FormEventProviderProps>;
export declare const useFormEventHub: () => FormEventContextType;
export declare const useFieldEventHandlers: (fieldId: string, schema?: any, fieldPath?: string[]) => {
onFocus: (value: any) => Promise<void>;
onBlur: (value: any) => Promise<void>;
onChange: (value: any) => Promise<void>;
};