DeleteButton
<DeleteButton hideText recordItemId={row.id} />
error of not recalling list after deletion
error of not recalling list after deletion
DeleteButton component in refine. This is likely due to an invalidation problem with the resources. onSuccess prop of the DeleteButton to manually invalidate the correct resource after deletion. Here's how you can modify your code:useTable hook or list component.DeleteButtonDeleteButtonimport { useInvalidate } from "@refinedev/core";
const invalidate = useInvalidate();
<DeleteButton
hideText
recordItemId={row.id}
onSuccess={() => {
invalidate({
resource: "your-resource-name",
invalidates: ["list"],
});
}}
/>