We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
What you were expecting:
For this code
const [ mutate ] = useMutation( undefined, { returnPromise: true } ); const post = await mutate( { type: 'create', resource: 'posts', data } ); console.log( post.data )
I expected post to be set.
post
What happened instead: post was not set after the await because the returnPromise got dropped at callTime.
await
Steps to reproduce:
Related code:
I believe this this line in useMutation should be like this line
Other information:
Environment
├─ @react-admin/ra-audit-log@2.5.1 ├─ @react-admin/ra-editable-datagrid@2.1.1 ├─ @react-admin/ra-enterprise@5.1.1 │ ├─ @react-admin/ra-form-layout@1.7.0 │ └─ @react-admin/ra-preferences@1.4.2 ├─ @react-admin/ra-form-layout@1.8.0 ├─ @react-admin/ra-markdown@1.3.1 ├─ @react-admin/ra-navigation@3.0.1 ├─ @react-admin/ra-preferences@1.4.3 ├─ @react-admin/ra-rbac@1.0.1 ├─ @react-admin/ra-realtime@1.4.3 ├─ @react-admin/ra-relationships@2.1.10 ├─ @react-admin/ra-search@2.2.1 ├─ @react-admin/ra-tour@1.2.0 ├─ @react-admin/ra-tree@1.6.8 └─ react-admin@3.19.1
The text was updated successfully, but these errors were encountered:
Thanks for reporting!
Sorry, something went wrong.
Excellent, thanks!
Successfully merging a pull request may close this issue.
What you were expecting:
For this code
I expected
post
to be set.What happened instead:
post
was not set after theawait
because the returnPromise got dropped at callTime.Steps to reproduce:
Related code:
I believe this this line in useMutation should be like this line
Other information:
Environment
├─ @react-admin/ra-audit-log@2.5.1
├─ @react-admin/ra-editable-datagrid@2.1.1
├─ @react-admin/ra-enterprise@5.1.1
│ ├─ @react-admin/ra-form-layout@1.7.0
│ └─ @react-admin/ra-preferences@1.4.2
├─ @react-admin/ra-form-layout@1.8.0
├─ @react-admin/ra-markdown@1.3.1
├─ @react-admin/ra-navigation@3.0.1
├─ @react-admin/ra-preferences@1.4.3
├─ @react-admin/ra-rbac@1.0.1
├─ @react-admin/ra-realtime@1.4.3
├─ @react-admin/ra-relationships@2.1.10
├─ @react-admin/ra-search@2.2.1
├─ @react-admin/ra-tour@1.2.0
├─ @react-admin/ra-tree@1.6.8
└─ react-admin@3.19.1
The text was updated successfully, but these errors were encountered: