Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Fix showing column recommendation breakingin table side panel editor

Joshen Lim078980accf17
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnEditor.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnEditor.tsx
index 37d15fae541..61a169e9555 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnEditor.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnEditor.tsx
@@ -249,6 +249,7 @@ const ColumnEditor: FC<Props> = ({
>
<FormSectionContent loading={false} className="lg:!col-span-8">
<ColumnType
+ showRecommendation
value={columnFields?.format ?? ''}
layout="vertical"
enumTypes={enumTypes}
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnType.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnType.tsx
index 3323ef8d2e9..97b5c0211d4 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnType.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnType.tsx
@@ -31,6 +31,7 @@ interface Props {
disabled?: boolean
showLabel?: boolean
description?: ReactNode
+ showRecommendation?: boolean
onOptionSelect: (value: string) => void
}
@@ -44,6 +45,7 @@ const ColumnType: FC<Props> = ({
disabled = false,
showLabel = true,
description,
+ showRecommendation = false,
onOptionSelect = () => {},
}) => {
// @ts-ignore
@@ -162,7 +164,7 @@ const ColumnType: FC<Props> = ({
</Listbox.Option>
))}
</Listbox>
- {recommendation !== undefined && (
+ {showRecommendation && recommendation !== undefined && (
<Alert
withIcon
variant="warning"