Skip to content

Commit 06c7c24

Browse files
committed
fix: don't change value prop on function
1 parent 6d601df commit 06c7c24

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/Field.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -219,12 +219,7 @@ class Field extends React.PureComponent {
219219
// Escape hatch for more complex Field types.
220220
if (typeof children === 'function') {
221221
fieldProps.type = resolveToNativeType(resolvedType)
222-
return children(
223-
Object.assign(
224-
fieldProps,
225-
getValueProps(fieldProps.type, value, this.props)
226-
)
227-
)
222+
return children(fieldProps)
228223
}
229224

230225
// in the case of a plain input do some schema -> native type mapping
@@ -485,7 +480,6 @@ export default withState((ctx, props, ref) => {
485480
fieldRef={fieldRef || ref}
486481
bindingProps={bindingProps}
487482
errors={ctx.errors}
488-
touched={ctx.touched}
489483
yupContext={ctx.yupContext}
490484
noValidate={ctx.noValidate}
491485
submits={ctx.submits}

0 commit comments

Comments
 (0)