mirror of
https://github.com/supabase/supabase.git
synced 2026-10-14 21:59:16 +03:00
Add types to resolve https://sentry.io/organizations/supabase/issues/2893351426
This commit is contained in:
1 parent
3d4b9a492c
commit
27ffd07fd0
2 files changed
+5
-3
No files matched your search
+3
-1
@@ -90,7 +90,9 @@ const ColumnEditor: FC<Props> = ({
|
||||
setErrors(updatedErrors)
|
||||
}
|
||||
|
||||
const saveColumnForeignKey = (foreignKeyConfiguration: any) => {
|
||||
const saveColumnForeignKey = (
|
||||
foreignKeyConfiguration: { table: PostgresTable; column: PostgresColumn } | undefined
|
||||
) => {
|
||||
onUpdateField({
|
||||
foreignKey: !isUndefined(foreignKeyConfiguration)
|
||||
? {
|
||||
|
||||
+2
-2
@@ -15,7 +15,7 @@ interface Props {
|
||||
metadata?: any
|
||||
visible: boolean
|
||||
closePanel: () => void
|
||||
saveChanges: (value: any) => void
|
||||
saveChanges: (value: { table: PostgresTable; column: PostgresColumn } | undefined) => void
|
||||
}
|
||||
|
||||
const ForeignKeySelector: FC<Props> = ({
|
||||
@@ -92,7 +92,7 @@ const ForeignKeySelector: FC<Props> = ({
|
||||
}
|
||||
setErrors(errors)
|
||||
if (isEmpty(errors)) {
|
||||
if (!selectedTable) {
|
||||
if (!selectedTable || !selectedColumn) {
|
||||
// Remove foreign key since no table selected
|
||||
saveChanges(undefined)
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user