sacred-roseS
Refine15mo ago
8 replies
sacred-rose

How to use Refine Antd DeleteButton with additional query params to the delete function?

This is my DeleteButton on the List
<DeleteButton
hideText
size="small"
recordItemId={record.id}
errorNotification={(error) => {
  const err = error as AxiosError<IError>

  return {
    message: "Error",
    description: err.response?.data?.error ?? "An error occurred",
    type: "error",
  }
}}
/>


And my delete endpoint looks like this
[DELETE] /service/:id?user_id=abc

How can I pass the user ID to the delete resource?
Was this page helpful?