Skip to content

Commit cf11587

Browse files
author
Robin Luiten
committed
Demonstrate Field with out value property as direct attribute.
This is the simplest way I could think of to demonstrate the issue I am seeing. An input control of type radio requires the value property to be set in the direct attribute parameters passed to Field. It does not work if the value is passed in via the 'props' property, this is why I think the type definition requires at least "value" be a direct if optional parameter on the Field interface on BaseFieldProps.
1 parent 09172d7 commit cf11587

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/simple/src/SimpleForm.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ const SimpleForm = (props) => {
2626
<div>
2727
<label>Sex</label>
2828
<div>
29-
<label><Field name="sex" component="input" type="radio" value="male"/> Male</label>
30-
<label><Field name="sex" component="input" type="radio" value="female"/> Female</label>
29+
<label><Field name="sex" component="input" type="radio" props={ { value:'male' } }/> Male</label>
30+
<label><Field name="sex" component="input" type="radio" props={ { value:'female' } }/> Female</label>
3131
</div>
3232
</div>
3333
<div>

0 commit comments

Comments
 (0)