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],