如何解决react-admin AutocompleteInput 无法识别道具 optionText
react-admin
3.12
道具 optionText
记录在此处 https://marmelab.com/react-admin/doc/3.12/Inputs.html,但是由于某种原因,typescript 无法识别它。我有什么遗漏吗?
<ReferenceInput
label="Label"
perPage={12}
source={"source"}
reference={resources.archives}
filterToQuery={q => ({ name: q })}
>
<AutocompleteInput
optionText={choice => choice.id ? `${choice.name}` : ''}
/>
</ReferenceInput>
提前致谢。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。