extended-dynamic-forms
Version:
Extended React JSON Schema Form (RJSF) v6 with custom components, widgets, templates, layouts, and form events
23 lines (22 loc) • 711 B
TypeScript
/**
* Utility for detecting field-level changes in form data
*/
export interface FieldChange {
fieldId: string;
fieldPath: string[];
oldValue: any;
newValue: any;
}
/**
* Deep comparison to find changed fields between two form data objects
*/
export declare function detectFieldChanges(oldData: any, newData: any, parentPath?: string[]): FieldChange[];
/**
* Convert field path to RJSF field ID format
* RJSF uses a specific format like "root_fieldName_0_subField"
*/
export declare function pathToFieldId(path: string[], idPrefix?: string): string;
/**
* Extract schema for a specific field path
*/
export declare function getFieldSchema(schema: any, path: string[]): any | undefined;