UNPKG

@talend/react-forms

Version:

React forms library based on json schema form.

68 lines (67 loc) 2.43 kB
export class UIFormComponent extends Component<any, any, any> { static displayName: string; constructor(props: any); state: { widgets: any; }; /** * Fire onChange callback while interacting with form fields * @param event The event that triggered the callback * @param schema The payload field schema * @param value The payload new value */ onChange(event: any, { schema, value }: { schema: any; value: any; }): void; /** * Perform validation and triggers when user has finished to change a value * @param event The event that triggered the callback * @param schema The payload field schema * @param value The new value, provided if not already taken into account * @param deepValidation Validate the subItems * Most of the time, this value is not provided. It will be taken from props.properties * This allows to perform triggers/validation while changing a value * (ex: add an element in array) * @param widgetChangeErrors Change errors hook, allows any widget to manipulate the errors map * (ex: shift the errors in array elements on remove) */ onFinish(event: any, { schema, value }: { schema: any; value: any; }, { deepValidation, widgetChangeErrors }?: { deepValidation?: boolean | undefined; }): void; /** * Triggers submit callback if form is valid * @param event the submit event */ onSubmit(event: any): boolean; /** * Triggers an onTrigger callback that is allowed to modify the form * @param event The event that triggered the callback * @param payload The trigger payload * trigger The type of trigger * schema The field schema */ onTrigger(event: any, payload: any): any; onActionClick(actionOnClick: any): (event: any, data: any) => any; focusFirstError(): void; setFormRef(element: any): void; /** * Update the state with the new schema. * @param jsonSchema * @param uiSchema */ componentDidUpdate(prevProps: any): void; formRef: any; render(): import("react/jsx-runtime").JSX.Element | null; } export namespace UIFormComponent { export let propTypes: any; import defaultProps = I18NUIForm.defaultProps; export { defaultProps }; } export default I18NUIForm; import { Component } from 'react'; declare const I18NUIForm: any;