-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Customising the message that appears after the delete operation in DeleteWithConfirmButton #9837
Comments
Hi, and thanks for your suggestion. You can already override the success side effects with the We won't offer an additional prop to do something you can already do with |
Understood, thanks for the reproduction. You're right: there is no easy way to do what you ask without rewriting significant parts of the controller. So we need to expose an option to let users override the message (something like I'm marking this as an enhancement. We'll welcome a PR implementing this feature. |
@fzaninotto I opened a PR for this feature. Can you review it? |
Is your feature request related to a problem? Please describe.
I want to customise the notification message that appears to the DeleteWithConfirmButton component after the delete operation is successful. (Only for some pages.) I can give the message using notify in the onSuccess method of the MutationOptions prop, but this time confirm is not turned off.
Describe the solution you'd like
Is it possible to add a new prop to customise the notify message that appears after the delete operation is successful in the DeleteWithConfirmButton component?
Or you can get props named handleSuccess, handleError and call them in the default onSuccess and onError methods in useDeleteWithConfirmController.
Describe alternatives you've considered
I can rewrite DeleteWithConfirmButton and useDeleteWithConfirmController components but it will be very costly for me.
Additional context
The text was updated successfully, but these errors were encountered: