File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
packages/react-form-renderer/src/files Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -2,13 +2,22 @@ import { Validator } from "./validators";
22import { ConditionDefinition } from './condition' ;
33import { DataType } from "./data-types" ;
44import { AnyObject } from "./common" ;
5+ import { FieldMetaState , FieldInputProps } from "react-final-form" ;
6+ import { FormOptions } from "./renderer-context" ;
57
68export type FieldAction = [ string , ...any [ ] ] ;
79
810export interface FieldActions {
911 [ key : string ] : FieldAction ;
1012}
1113
14+ export interface FieldApi < FieldValue , T extends HTMLElement = HTMLElement > {
15+ meta : FieldMetaState < FieldValue > ;
16+ input : FieldInputProps < FieldValue , T > ;
17+ }
18+
19+ export type ResolvePropsFunction = ( props : AnyObject , fieldApi : FieldApi < any > , formOptions : FormOptions ) => AnyObject ;
20+
1221interface Field extends AnyObject {
1322 name : string ;
1423 component : string ;
@@ -20,6 +29,7 @@ interface Field extends AnyObject {
2029 clearedValue ?: any ;
2130 clearOnUnmount ?: boolean ;
2231 actions ?: FieldActions ;
32+ resolveProps ?: ResolvePropsFunction ;
2333}
2434
2535export default Field ;
You can’t perform that action at this time.
0 commit comments