Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript identifies no record prop on Edit component #7624

Closed
wongathon opened this issue May 3, 2022 · 1 comment · Fixed by #7628
Closed

Typescript identifies no record prop on Edit component #7624

wongathon opened this issue May 3, 2022 · 1 comment · Fixed by #7628
Assignees

Comments

@wongathon
Copy link

Typescript error passing record prop to Edit component, prop does not exist and component not reading record override

image

Attempting to render only if transformedRecord exists - still retrieves from resource getOne and not using supplied transformedRecord

image

TS error ignore-override -- still does not use supplied transformedRecord
image

As seen in docs, it should be there: https://marmelab.com/react-admin/Edit.html#record

@fzaninotto fzaninotto self-assigned this May 4, 2022
@fzaninotto
Copy link
Member

fzaninotto commented May 4, 2022

Thanks for the report.

The documentation is erroneous - <Edit> does not and should not accept a custom record.

The wrong doc was introduced in e4c56e4 by copying the Create documentation (and <Create> does accept a record prop).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants