Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
306 views
in Technique[技术] by (71.8m points)

reactjs - ReferenceInput is not filing the select component

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>

screenshot


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Remove the resource prop from the referenceinput


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...