I’m using the following library @tanstack/react-table to manage a category table in Table component, this table has a column ACTIONS that allows me to edit or delete a row.
When I click on trash icon to delete a category, the following DELETE request ${baseURL}/categories/delete/${row.original.categoryId}
is sent to the server to delete the item and then I filter the table to remove the row by rowIndex. the issue is when I navigate to another page (Ex: Dashboard) and then go back to Categories.tsx component it ends up showing me the data with deleted row.
delete dat by the row.original.categoryId not with index or refecth after delete
1