mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
fix schema selector in create fn sheet (#36141)
* fix schema selector in create fn sheet * fix schemaselctor in auth hook * add portal false to schemaselector in sqlfunction for cronjobs * Fix schema selector in function sheet --------- Co-authored-by: Terry Sutton <saltcod@gmail.com>
This commit is contained in:
1 parent
f7d90bbc30
commit
792e2316f0
4 files changed
+6
-1
No files matched your search
@@ -367,6 +367,7 @@ export const CreateHookSheet = ({
|
||||
>
|
||||
<FormControl_Shadcn_>
|
||||
<SchemaSelector
|
||||
portal={false}
|
||||
size="small"
|
||||
showError={false}
|
||||
selectedSchemaName={field.value}
|
||||
|
||||
@@ -202,6 +202,7 @@ const CreateFunction = ({ func, visible, setVisible }: CreateFunctionProps) => {
|
||||
>
|
||||
<FormControl_Shadcn_>
|
||||
<SchemaSelector
|
||||
portal={false}
|
||||
selectedSchemaName={field.value}
|
||||
excludedSchemas={PROTECTED_SCHEMAS}
|
||||
size="small"
|
||||
|
||||
@@ -21,6 +21,7 @@ export const SqlFunctionSection = ({ form }: SqlFunctionSectionProps) => {
|
||||
render={({ field }) => (
|
||||
<FormItemLayout label="Schema" className="gap-1">
|
||||
<SchemaSelector
|
||||
portal={false}
|
||||
size="small"
|
||||
className="w-56 2xl:w-full"
|
||||
selectedSchemaName={field.value}
|
||||
|
||||
@@ -34,6 +34,7 @@ interface SchemaSelectorProps {
|
||||
excludedSchemas?: string[]
|
||||
onSelectSchema: (name: string) => void
|
||||
onSelectCreateSchema?: () => void
|
||||
portal?: boolean
|
||||
}
|
||||
|
||||
const SchemaSelector = ({
|
||||
@@ -46,6 +47,7 @@ const SchemaSelector = ({
|
||||
excludedSchemas = [],
|
||||
onSelectSchema,
|
||||
onSelectCreateSchema,
|
||||
portal = true,
|
||||
}: SchemaSelectorProps) => {
|
||||
const [open, setOpen] = useState(false)
|
||||
const canCreateSchemas = useCheckPermissions(PermissionAction.TENANT_SQL_ADMIN_WRITE, 'schemas')
|
||||
@@ -126,7 +128,7 @@ const SchemaSelector = ({
|
||||
className="p-0 min-w-[200px] pointer-events-auto"
|
||||
side="bottom"
|
||||
align="start"
|
||||
portal={true}
|
||||
portal={portal}
|
||||
sameWidthAsTrigger
|
||||
>
|
||||
<Command_Shadcn_>
|
||||
|
||||
Reference in new issue
Block a user