@@ -79,6 +79,7 @@ interface ObservableProps {
79
79
help ?: ObservedFnOrValue < FieldGroupProps [ 'help' ] > ;
80
80
highlighted ?: ObservedFnOrValue < FieldGroupProps [ 'highlighted' ] > ;
81
81
inline ?: ObservedFnOrValue < FieldGroupProps [ 'inline' ] > ;
82
+ placeholder ?: ObservedFnOrValue < string > ;
82
83
visible ?: ObservedFnOrValue < FieldGroupProps [ 'visible' ] > ;
83
84
}
84
85
@@ -91,6 +92,7 @@ interface ResolvedObservableProps {
91
92
help ?: FieldGroupProps [ 'help' ] ;
92
93
highlighted ?: FieldGroupProps [ 'highlighted' ] ;
93
94
inline ?: FieldGroupProps [ 'inline' ] ;
95
+ placeholder ?: string ;
94
96
visible ?: FieldGroupProps [ 'visible' ] ;
95
97
}
96
98
@@ -121,7 +123,6 @@ interface BaseProps {
121
123
onBlur ?: ( value : any , event : any ) => void ;
122
124
onChange ?: ( value : any , event : any ) => void ;
123
125
onKeyDown ?: ( value : any , event : any ) => void ;
124
- placeholder ?: ObservedFnOrValue < React . ReactNode > ;
125
126
126
127
resetOnError ?: boolean ;
127
128
/**
@@ -171,7 +172,9 @@ export interface FormFieldProps
171
172
* ResolvedProps do NOT include props which may be given functions that are
172
173
* reacted on. Resolved props are used inside of makeField.
173
174
*/
174
- type ResolvedProps = BaseProps & FieldGroupProps ;
175
+ interface ResolvedProps extends BaseProps , Omit < FieldGroupProps , 'children' > {
176
+ placeholder ?: string ;
177
+ }
175
178
176
179
type PassthroughProps = Omit <
177
180
ResolvedProps ,
@@ -370,10 +373,6 @@ function FormField(props: FormFieldProps) {
370
373
error,
371
374
initialData : model . initialData ,
372
375
'aria-describedby' : `${ id } _help` ,
373
- placeholder :
374
- typeof fieldProps . placeholder === 'function'
375
- ? fieldProps . placeholder ( { ...props , model} )
376
- : fieldProps . placeholder ,
377
376
} ) }
378
377
</ Fragment >
379
378
) ;
0 commit comments