Skip to content

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

fix(studio): function form reset only after open or change (#41871)

Danny White2d8bead1741e
diff --git a/apps/studio/components/interfaces/Database/Functions/CreateFunction/index.tsx b/apps/studio/components/interfaces/Database/Functions/CreateFunction/index.tsx
index 88efee47e75..095acb0f487 100644
--- a/apps/studio/components/interfaces/Database/Functions/CreateFunction/index.tsx
+++ b/apps/studio/components/interfaces/Database/Functions/CreateFunction/index.tsx
@@ -152,7 +152,8 @@ export const CreateFunction = ({
config_params: convertConfigParams(func?.config_params).value,
})
}
- }, [visible, func])
+ // eslint-disable-next-line react-hooks/exhaustive-deps
+ }, [visible, func?.id])
const { data: protectedSchemas } = useProtectedSchemas()