Skip to content

Commit

Permalink
move resetTableSelection
Browse files Browse the repository at this point in the history
  • Loading branch information
bosiraphael committed Oct 17, 2024
1 parent 6fa11fd commit 43efae4
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ export const DeleteRecordsActionEffect = ({
const handleDeleteClick = useCallback(async () => {
const recordIdsToDelete = await fetchAllRecordIds();

resetTableRowSelection();

for (const recordIdToDelete of recordIdsToDelete) {
const foundFavorite = favorites?.find(
(favorite) => favorite.recordId === recordIdToDelete,
Expand All @@ -62,7 +64,6 @@ export const DeleteRecordsActionEffect = ({
await deleteManyRecords(recordIdsToDelete, {
delayInMsBetweenRequests: 50,
});
resetTableRowSelection();
}, [
deleteFavorite,
deleteManyRecords,
Expand Down

0 comments on commit 43efae4

Please sign in to comment.