The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Merge branch 'master' into chore/table-editor-rows-react-query
Alaister Young429764fd788e
diff --cc studio/components/grid/types/grid.tsindex 4424a2d5127,bae5c96556b..f64fd05917a--- a/studio/components/grid/types/grid.ts+++ b/studio/components/grid/types/grid.ts@@@ -64,8 -64,16 +64,17 @@@ export interface SupabaseGridProps*/onEditRow?: (row: SupaRow) => voidonError?: (error: any) => void+ /**+ * Toggle api preview panel open+ */+ apiPreviewPanelOpen?: boolean+ setApiPreviewPanelOpen?: () => void+ /**+ * Refresh the docs after a change is made to the table+ */+ refreshDocs: () => voidonExpandJSONEditor: (column: string, row: SupaRow) => void+ updateTableRow: (previousRow: any, updatedData: any) => void}export interface SupabaseGridRef {diff --cc studio/components/interfaces/TableGridEditor/TableGridEditor.tsxindex 3f8db645707,158d28883b5..ef5851151a4--- a/studio/components/interfaces/TableGridEditor/TableGridEditor.tsx+++ b/studio/components/interfaces/TableGridEditor/TableGridEditor.tsx@@@ -10,16 -10,16 +10,24 @@@ import { checkPermissions, useFlag, useimport GridHeaderActions from './GridHeaderActions'import NotFoundState from './NotFoundState'import SidePanelEditor from './SidePanelEditor'-import { Dictionary, parseSupaTable, SupabaseGrid, SupabaseGridRef } from 'components/grid'+import {+ Dictionary,+ parseSupaTable,+ SupabaseGrid,+ SupabaseGridRef,+ SupaTable,+} from 'components/grid'+ import { IconBookOpen, SidePanel } from 'ui'+ import ActionBar from './SidePanelEditor/ActionBar'+ import { GeneralContent, ResourceContent } from '../Docs'+ import { useProjectApiQuery } from 'data/config/project-api-query'+ import { useProjectJsonSchemaQuery } from 'data/docs/project-json-schema-query'+ import { snakeToCamel } from 'lib/helpers'import { JsonEditValue } from './SidePanelEditor/RowEditor/RowEditor.types'+ import LangSelector from '../Docs/LangSelector'+ import GeneratingTypes from '../Docs/GeneratingTypes'+import { useTableRowUpdateMutation } from 'data/table-rows/table-row-update-mutation'+import { useProjectContext } from 'components/layouts/ProjectLayout/ProjectContext'interface Props {/** Theme for the editor */@@@ -67,11 -67,22 +75,23 @@@ const TableGridEditor: FC<Props> = (onExpandJSONEditor = () => {},onClosePanel = () => {},}) => {++ const { project } = useProjectContext()const { meta, ui, vault } = useStore()const router = useRouter()+ const { ref: projectRef, page, id } = useParams()const gridRef = useRef<SupabaseGridRef>(null)- const { project } = useProjectContext()- const projectRef = project?.ref++ const tables = meta.tables.list()++ const { data: settings } = useProjectApiQuery({ projectRef: projectRef })++ const autoApiService = {+ ...settings?.autoApiService,+ endpoint: `${settings?.autoApiService.protocol ?? 'https'}://${+ settings?.autoApiService.endpoint ?? '-'+ }`,+ }+ const DEFAULT_KEY = { name: 'hide', key: 'SUPABASE_KEY' }const isVaultEnabled = useFlag('vaultExtension')const [encryptedColumns, setEncryptedColumns] = useState([])