Skip to content

Commit 0d9c57f

Browse files
waleedlatif1claude
andcommitted
fix(tables): remove unstable mutation object from useCallback deps
deleteTableMutation is not referentially stable — only .mutateAsync() is. Including the mutation object causes unnecessary callback recreation on every mutation state change. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent fa29a6f commit 0d9c57f

File tree

1 file changed

+2
-1
lines changed
  • apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table

1 file changed

+2
-1
lines changed

apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table/table.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,8 @@ export function Table({
459459
} catch {
460460
setShowDeleteTableConfirm(false)
461461
}
462-
}, [deleteTableMutation, tableId, router, workspaceId])
462+
// eslint-disable-next-line react-hooks/exhaustive-deps
463+
}, [tableId, router, workspaceId])
463464

464465
const toggleBooleanCell = useCallback(
465466
(rowId: string, columnName: string, currentValue: unknown) => {

0 commit comments

Comments
 (0)