Notification provider
How to customize success notification on create, edit, update and delete
2 Replies
Hi @Sly. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
In Refine, you can customize the success notification for various operations like create, edit, update, and delete using the
successNotification
prop in the respective hooks. The NotificationProvider
is required for this prop to work.
Here are examples of how you can customize the success notification for different operations:
Create:
Source (https://refine.dev/docs/data/hooks/use-create#successnotification)
Edit:
Source (https://refine.dev/docs/data/hooks/use-form#successnotification-)
Update:
Source (https://refine.dev/docs/data/hooks/use-update#successnotification)
Delete:
Source (https://refine.dev/docs/data/hooks/use-delete#successnotification)
In each of these examples, the successNotification
prop is a function that returns an object with message
, description
, and type
properties. The message
and description
can be customized as per your needs. The type
should be set to "success" for success notifications.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@1172098337760096258> kapa.ai is still learning and improving, please let us know how it did by reacting below