diff --git a/web/src/components/admin/connectors/Field.tsx b/web/src/components/admin/connectors/Field.tsx index 56431954552..271a7447f3d 100644 --- a/web/src/components/admin/connectors/Field.tsx +++ b/web/src/components/admin/connectors/Field.tsx @@ -25,7 +25,7 @@ import { } from "@radix-ui/react-tooltip"; import ReactMarkdown from "react-markdown"; import { FaMarkdown } from "react-icons/fa"; -import { useState } from "react"; +import { useRef, useState } from "react"; import remarkGfm from "remark-gfm"; import { EditIcon } from "@/components/icons/icons"; import { Button } from "@/components/ui/button"; @@ -602,6 +602,11 @@ export function SelectorFormField({ }: SelectorFormFieldProps) { const [field] = useField(name); const { setFieldValue } = useFormikContext(); + const [container, setContainer] = useState(null); + + const currentlySelected = options.find( + (option) => option.value?.toString() === field.value?.toString() + ); return (
@@ -612,7 +617,7 @@ export function SelectorFormField({
)} {subtext && {subtext}} -
+
diff --git a/web/src/components/ui/select.tsx b/web/src/components/ui/select.tsx index 7f6941201c9..0efc6be15f9 100644 --- a/web/src/components/ui/select.tsx +++ b/web/src/components/ui/select.tsx @@ -69,9 +69,11 @@ SelectScrollDownButton.displayName = const SelectContent = React.forwardRef< React.ElementRef, - React.ComponentPropsWithoutRef ->(({ className, children, position = "popper", ...props }, ref) => ( - + React.ComponentPropsWithoutRef & { + container?: HTMLElement | null; + } +>(({ className, children, position = "popper", container, ...props }, ref) => ( +