如何解决没有编辑或创建,ReferenceInput不起作用
问题是我发现在我创建的组件中,我不使用创建或编辑,而仅使用代码中显示的SimpleForm,ReferenceInput对我不起作用。哪个查询我的API很好,但没有显示我得到的值,没有任何帮助吗?
return (
<>
<Dialog
fullWidth
open={props.createEvent}
onClose={handleCloseClick}
aria-label="Crear turno"
>
<DialogTitle>Indicar el rango de horas disponibles</DialogTitle>
<DialogContent>
<SimpleForm
resource="session"
save={handleSubmit}
validate={validate}
toolbar={<ButtonToolbar onCancel={handleCloseClick}/>}
>
<ReferenceInput
source="patientId"
reference="patient"
label="Paciente"
filterToQuery={searchText => ({ name: searchText })}>
<AutocompleteInput initialValue={ props.initialValue ? props.initialValue : null } optionText="name" />
</ReferenceInput>
</SimpleForm>
</DialogContent>
</Dialog>
</>
);
谢谢
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。