@pagamio/frontend-commons-lib
Version:
Pagamio library for Frontend reusable components like the form engine and table container
19 lines (18 loc) • 992 B
TypeScript
import React from 'react';
import type { DependentFieldUpdate, Field, FieldWrapperProps, SelectOption } from '../types';
interface ExtendedFieldWrapperProps extends FieldWrapperProps {
onFieldUpdate?: Record<string, DependentFieldUpdate[]>;
onFieldChange?: (fieldName: string, value: any) => void;
setValue?: (field: string, value: any) => void;
clearErrors?: (field: string) => void;
updateFieldOptions?: (field: string, options: Array<SelectOption | string>) => void;
updateFieldLabel?: (fieldName: string, newLabelName: string) => void;
setFieldHidden?: (fieldName: string, hidden: boolean) => void;
addField?: (fields: Field) => void;
pendingUpdatesRef?: React.MutableRefObject<Map<string, any>>;
processingDependencyRef?: React.MutableRefObject<boolean>;
fieldChangeRef?: React.MutableRefObject<Set<string>>;
notifyPendingUpdate?: () => void;
}
declare const FieldWrapper: React.FC<ExtendedFieldWrapperProps>;
export default FieldWrapper;