useDeleteMany success function
How can i call a function after deleting some ids succesfully?
5 Replies
Hi @Shyamili. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
You can call a function after deleting some IDs successfully by using the
onSuccess
callback in the DeleteButton
component. Here's an example of how to do this:
In this example, the console.log
function is called after the deletion is successful. You can replace it with your custom function.
Source: refine.dev/docs/api-reference/mui/components/buttons/delete-button (https://refine.dev/docs/api-reference/mui/components/buttons/delete-button)
----------------------
Note: you can ask me a follow up question by @ mentioning me again
:speech_balloon:
----------------------Delete | refine
uses Material UI and
components.<@1011493481136541737> kapa.ai is still learning and improving, please let us how it did by reacting below
ambitious-aqua•17mo ago
Hey @Shyamili You should check here https://refine.dev/docs/api-reference/core/hooks/data/useDeleteMany/#mutationoptions
useDeleteMany | refine
useDeleteMany is an extended version of TanStack Query's useMutation. It supports all the features of useMutation and adds some extra features.
unwilling-turquoise•17mo ago
oky..thank you