我想在一个反应语义UI中添加一个,但即使在我将Checkbox命名为这样之后,它也无法将检查的值发送到服务器:
<Form.Field
label="The question is new to the intent library"
name="newType"
control={Field}
component={Checkbox}
/>
这个组件在这样的表单中:
<Form>
<Form.Field
label="Rating"
control={Field}
name="rate"
component={Rating}
...
/>
<That checkbox ... />
<Form.Field
label="Comment"
control={Field}
name="comment"
component="textarea"
/>
</Form>
假定的动作应该带有有效载荷中的检查值,类似于评级和评论的携带方式。
我被困在这里半天如果你发现了什么请帮助我。谢谢!
使用以下代码解决了该问题
<Form.Field
control={Field}
label="The question is new to the intent library"
name="newType"
component="input"
type="checkbox"
/>