首页 > 解决方案 > ReferenceInput 未归档选择组件

问题描述

在 React-admin 中,我试图实现一个参考输入。我看到列表 api 调用已进行并且响应可用。但是 selectinput 组件仍然为空。我将不胜感激任何帮助。表源列是notes。参考资源是注释

<Create actions={<CoaActions />}  title="New Coa" {...props}>
    <SimpleForm variant="standard">
        <TextInput source="code" />
        <TextInput multiline source="title" />
        <TextInput source="iscashbook" />
        <TextInput source="isbankbook" />
        <ReferenceInput label="Notes" source="notes" resource="notes" reference="notes/list">
            <SelectInput optionText="name" />
        </ReferenceInput>
        <TextInput source="obal" />
        <BooleanInput  source="active" />
    </SimpleForm>
</Create>

截屏

标签: reactjsreact-admin

解决方案


从参考输入中删除资源道具


推荐阅读