Skip to content

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

fix: do not submit SQL generate submit prompt unless search is undefined

Jonathan Summers-Muirf3e1236d0b7e
diff --git a/packages/ui/src/components/Command/GenerateSQL/GenerateSQL.tsx b/packages/ui/src/components/Command/GenerateSQL/GenerateSQL.tsx
index 9039f484607..66e9b9dd4e9 100644
--- a/packages/ui/src/components/Command/GenerateSQL/GenerateSQL.tsx
+++ b/packages/ui/src/components/Command/GenerateSQL/GenerateSQL.tsx
@@ -200,7 +200,9 @@ const GenerateSQL = () => {
<CommandItem
type="command"
onSelect={() => {
- handleSubmit(query)
+ if (!search) {
+ handleSubmit(query)
+ }
}}
onKeyDown={(e) => e.keyCode === 13 && handleSubmit(query)}
forceMount