mirror of
https://github.com/supabase/supabase.git
synced 2026-10-16 14:49:10 +03:00
Fix column type wrong rendering
This commit is contained in:
1 parent
e2ea3a0554
commit
5b88f35540
1 file changed
+12
-4
+12
-4
@@ -25,17 +25,23 @@ const ColumnType: FC<Props> = ({
|
||||
showLabel = true,
|
||||
onOptionSelect = () => {},
|
||||
}) => {
|
||||
const isNativeDataType = POSTGRES_DATA_TYPES.includes(value)
|
||||
// @ts-ignore
|
||||
const availableTypes = POSTGRES_DATA_TYPES.concat(enumTypes.map((type) => type.name))
|
||||
const isAvailableType = value ? availableTypes.includes(value) : true
|
||||
|
||||
if (!isNativeDataType) {
|
||||
if (!isAvailableType) {
|
||||
return (
|
||||
<Input
|
||||
readOnly
|
||||
disabled
|
||||
label="Type"
|
||||
label={showLabel ? 'Type' : ''}
|
||||
layout="horizontal"
|
||||
value={value}
|
||||
descriptionText="Custom non-native psql data types cannot currently be changed to a different data type via Supabase Studio"
|
||||
descriptionText={
|
||||
showLabel
|
||||
? 'Custom non-native psql data types cannot currently be changed to a different data type via Supabase Studio'
|
||||
: ''
|
||||
}
|
||||
/>
|
||||
)
|
||||
}
|
||||
@@ -61,6 +67,8 @@ const ColumnType: FC<Props> = ({
|
||||
}
|
||||
}
|
||||
|
||||
console.log('ColumnType', showLabel)
|
||||
|
||||
return (
|
||||
<Listbox
|
||||
label={showLabel ? 'Type' : ''}
|
||||
|
||||
Reference in new issue
Block a user