From 43efae4aea79dad9ee1c2830ccc0e92a2dfaf924 Mon Sep 17 00:00:00 2001 From: bosiraphael Date: Thu, 17 Oct 2024 18:54:56 +0200 Subject: [PATCH] move resetTableSelection --- .../record-actions/components/DeleteRecordsActionEffect.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/twenty-front/src/modules/action-menu/actions/record-actions/components/DeleteRecordsActionEffect.tsx b/packages/twenty-front/src/modules/action-menu/actions/record-actions/components/DeleteRecordsActionEffect.tsx index 70d50d5735c6..0a0e7aa7ad3b 100644 --- a/packages/twenty-front/src/modules/action-menu/actions/record-actions/components/DeleteRecordsActionEffect.tsx +++ b/packages/twenty-front/src/modules/action-menu/actions/record-actions/components/DeleteRecordsActionEffect.tsx @@ -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, @@ -62,7 +64,6 @@ export const DeleteRecordsActionEffect = ({ await deleteManyRecords(recordIdsToDelete, { delayInMsBetweenRequests: 50, }); - resetTableRowSelection(); }, [ deleteFavorite, deleteManyRecords,