-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Mutation forces refreshing even provided with options #3125
Comments
Hi !
Then for the notification part, I can see a little error on the documentation page as the format for a notification side effect is the following: export interface NotificationSideEffect {
body: string;
level: NotificationType;
messageArgs?: object;
} As seen here. Maybe we could add a tiny hint to users so they could find where all the magic happens 😄 I wish i was not wrong and I was pleased to help you! |
@kayneth is right twice:
I'm closing this one as it's not a react-admin bug. |
What you were expecting:
The doc says Mutation accepts an options prop to customize the side effect processing by the CUSTOM_FETCH action. I found it's partially true. The onSuccess part is not read into the action I think.
``
What happened instead:
If I click the button, I will catch a CUSTOM_FETCH. It has a meta part which always contains onSuccess:{refresh:true} no matter how I config the options prop for the Mutation component. However, the onError part is correct read from the given prop. Weird!
Steps to reproduce:
I used the dataprovider from the tutorial. Just a fake user list.
Related code:
Other information:
Environment
The text was updated successfully, but these errors were encountered: