【发布时间】:2017-11-03 13:43:22
【问题描述】:
我想从aor 创建一个包含Inputs 和Fields 的新组件,并在<SimpleForm> 和<TabbedForm> 中使用它,如下所示:
const WrapperComp = () => {
return (
<div>
<TextFieldLabel muiTheme={muiTheme}>Title Example</TextFieldLabel>,
<TextInput source="status"/>,
<TextField source="status"/>
</div>
)
}
<SimpleForm>
<WrapperComp />
</SimpleForm>
但我得到Uncaught Error: The TextInput component wasn't called within a redux-form <Field>. Did you decorate it and forget to add the addField prop to your component?。
任何帮助将不胜感激。谢谢!
【问题讨论】:
标签: reactjs admin-on-rest