From 5d08e8ca903cbc92fdb70abacaa16c79fd7fe1bd Mon Sep 17 00:00:00 2001 From: Ali Waseem Date: Thu, 22 Jan 2026 15:00:32 -0700 Subject: [PATCH] updated code rabbit review --- apps/studio/state/table-editor-table.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/studio/state/table-editor-table.tsx b/apps/studio/state/table-editor-table.tsx index 63961d50c3f..bbd03577f7f 100644 --- a/apps/studio/state/table-editor-table.tsx +++ b/apps/studio/state/table-editor-table.tsx @@ -80,6 +80,11 @@ export const createTableEditorTableState = ({ { gridColumns: state.gridColumns } ) + // Clear undo history when switching to a different table to avoid cross-table undos + if (state.originalTable.id !== table.id) { + state.cellEditHistory = [] + } + state.table = supaTable state.gridColumns = gridColumns state.originalTable = table