Closed GuillaumeJasmin closed 7 years ago
You need not only to pass your custom key to the reducersFor
function but also to the actionCreatorsFor
function.
For example:
reduxCrud.actionCreatorsFor(resource.path, {key: 'uuid'});
Thanks ! This was not specified in doc, so I added it
@hwaterke thanks for answering issues, really appreciate it
I use a custom key "uuid" instead of "id", like this:
reduxCrud.List.reducersFor('permissions', {key: 'uuid'});
It works with fetchSuccess(data), but I get this error when I want to update with updateSuccess(data), or create with createSuccess(data):
Uncaught (in promise) Error: Expected record.id in updateSuccess
I don't understand, because my data has a "uuid" key.
Maybe the custom key is not implemented into create or update action ?
Thanks