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";
2
2
import { ConditionDefinition } from './condition' ;
3
3
import { DataType } from "./data-types" ;
4
4
import { AnyObject } from "./common" ;
5
+ import { FieldMetaState , FieldInputProps } from "react-final-form" ;
6
+ import { FormOptions } from "./renderer-context" ;
5
7
6
8
export type FieldAction = [ string , ...any [ ] ] ;
7
9
8
10
export interface FieldActions {
9
11
[ key : string ] : FieldAction ;
10
12
}
11
13
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
+
12
21
interface Field extends AnyObject {
13
22
name : string ;
14
23
component : string ;
@@ -20,6 +29,7 @@ interface Field extends AnyObject {
20
29
clearedValue ?: any ;
21
30
clearOnUnmount ?: boolean ;
22
31
actions ?: FieldActions ;
32
+ resolveProps ?: ResolvePropsFunction ;
23
33
}
24
34
25
35
export default Field ;
You can’t perform that action at this time.
0 commit comments