ReferenceInput is not filing the select component

老子叫甜甜 提交于 2021-02-11 13:11:10

问题


In React-admin i am trying to implement a referenceinput. I see that the list api call is made and response is availble. however the selectinput component remains empty. I would appreciate any help. Table source column is notes. and reference resource is 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>


回答1:


Remove the resource prop from the referenceinput



来源:https://stackoverflow.com/questions/65507403/referenceinput-is-not-filing-the-select-component

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!