Reactjs 引用输入在没有编辑或创建的情况下不起作用

Reactjs 引用输入在没有编辑或创建的情况下不起作用,reactjs,react-admin,Reactjs,React Admin,问题是,我发现在我创建的组件中,我不使用Create或Edit,我只使用SimpleForm,正如我在代码中所示,ReferenceInput对我不起作用。它查询我的API很好,但没有显示值​​有人帮我吗 return ( <> <Dialog fullWidth open={props.createEvent} onClose={ha

问题是,我发现在我创建的组件中,我不使用Create或Edit,我只使用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>
        </>
    );

返回(
有争议的地方
({name:searchText})}>
);
谢谢