From 35cf4d9bc076168d16df250cfebfcce94bb615de Mon Sep 17 00:00:00 2001 From: Joshen Lim Date: Fri, 19 Sep 2025 16:47:14 +0700 Subject: [PATCH] here we go again --- apps/studio/state/table-editor-table.tsx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/apps/studio/state/table-editor-table.tsx b/apps/studio/state/table-editor-table.tsx index b3271a10119..69163bf60c6 100644 --- a/apps/studio/state/table-editor-table.tsx +++ b/apps/studio/state/table-editor-table.tsx @@ -163,7 +163,18 @@ export const createTableEditorTableState = ({ export type TableEditorTableState = ReturnType -export const TableEditorTableStateContext = createContext(proxy({} as any)) +const DEFAULT_STATE_CONFIG = { + projectRef: '', + table: undefined as any, + editable: undefined, + onAddColumn: () => {}, + onExpandJSONEditor: () => {}, + onExpandTextEditor: () => {}, +} + +export const TableEditorTableStateContext = createContext( + createTableEditorTableState(DEFAULT_STATE_CONFIG) +) type TableEditorTableStateContextProviderProps = Omit< Parameters[0],