我试图使用Redux的形式与反应语意UI,并具有与该复选框组件的麻烦。 复选框未被检查。我遵循还原形式文档的示例,但没有运气。以下是代码片段:无法做出与Redux的形式复选框工作和反应语意UI
renderCheckBox = ({ input, label }) => {
console.log(input.value);
return (
<Form.Field>
<Checkbox
label={label}
checked={input.value ? true : false}
onChange={input.onChange}
/>
</Form.Field>
);
};
<Field
name="activated"
label="Activate?"
component={this.renderCheckBox}
/>
console.log(input.value)
的输出为空。
嗨,示例不在这里工作。它只显示“Loading”。 –
您使用的是IE还是过时的网络浏览器?您应该看到类似[this](http://i.imgur.com/zfkRuAA.png) – QoP
我正在使用最新版本的Chrome。现在表格也显示出来了。我也尝试了你的代码,但问题是一样的。我发现在** input type =“复选框**上有** hidden **类,它有'z-index:-1'。我删除了'z-index',现在按预期工作。你的工作不需要删除** z-index **值 –