DeleteButton
<DeleteButton hideText recordItemId={row.id} />
error of not recalling list after deletion
3 Replies
Hi @Su Fly 007. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Based on the information provided in the knowledge sources, it appears that you're encountering an issue where the list doesn't update after deleting an item using the
DeleteButton
component in refine. This is likely due to an invalidation problem with the resources.
To resolve this issue, you can use the onSuccess
prop of the DeleteButton
to manually invalidate the correct resource after deletion. Here's how you can modify your code:
Replace "your-resource-name" with the actual name of your resource.
This solution is based on the information provided in the GitHub issue discussion (https://github.com/refinedev/refine/issues/4655), where a similar problem was addressed.
The reason for this issue is that the invalidation might not work correctly if the resource names don't match exactly. By manually invalidating the correct resource after deletion, you ensure that the list is updated properly.
If this solution doesn't resolve your issue, you may need to provide more details about your specific implementation, including the resource name and how you've set up your useTable
hook or list component.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@617879699363725341> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
extended-salmon•4d ago
what do you mean "recalling"? does it not fetch new data?