Update id - ra.notification.data_provider_error
VladimirSiv opened this issue ยท comments
Hello,
Thanks for creating this library! Helps a lot.
I've noticed that update
function doesn't return id
field which triggers ra.notification.data_provider_error
with the following message:
The response to 'update' must be like { data: { id: 123, ... } }, but the received data does not have an 'id' key. The dataProvider is probably wrong for 'update'
It seems that update
function is not compatible with ra-data-simple-rest
stated here: React-Admin Data Providers
Replacing line with:
res.json({ id: (await doUpdate(req.params.id, req.body))[0] });
resolved issue for me.
Please let me know what you think.
Thanks!
๐ This issue has been resolved in version 7.0.1 ๐
The release is available on:
Your semantic-release bot ๐ฆ๐