File tree 1 file changed +5
-0
lines changed
packages/ra-core/src/form
1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ const FormDataConsumer = <TFieldValues extends FieldValues = FieldValues>(
63
63
< FormDataConsumerView < TFieldValues > formData = { formData } { ...props } />
64
64
) ;
65
65
} ;
66
+
66
67
export const FormDataConsumerView = <
67
68
TFieldValues extends FieldValues = FieldValues ,
68
69
TPathValue = PathValue < TFieldValues , Path < TFieldValues > > [ ]
@@ -85,23 +86,27 @@ export const FormDataConsumerView = <
85
86
} ;
86
87
87
88
export default FormDataConsumer ;
89
+
88
90
export interface FormDataConsumerRenderParams <
89
91
TFieldValues extends FieldValues = FieldValues
90
92
> {
91
93
formData : TFieldValues ;
92
94
scopedFormData ?: any ;
93
95
getSource ?: ( source : string ) => string ;
94
96
}
97
+
95
98
export type FormDataConsumerRender <
96
99
TFieldValues extends FieldValues = FieldValues
97
100
> = ( params : FormDataConsumerRenderParams < TFieldValues > ) => ReactNode ;
101
+
98
102
interface ConnectedProps < TFieldValues extends FieldValues = FieldValues > {
99
103
children : FormDataConsumerRender < TFieldValues > ;
100
104
form ?: string ;
101
105
record ?: any ;
102
106
source ?: string ;
103
107
[ key : string ] : any ;
104
108
}
109
+
105
110
interface Props < TFieldValues extends FieldValues > extends ConnectedProps {
106
111
formData : TFieldValues ;
107
112
index ?: number ;
You can’t perform that action at this time.
0 commit comments