diff --git a/web/src/components/custom-form/ModelPickerView.tsx b/web/src/components/custom-form/ModelPickerView.tsx index 79d22aa..dd093af 100644 --- a/web/src/components/custom-form/ModelPickerView.tsx +++ b/web/src/components/custom-form/ModelPickerView.tsx @@ -16,6 +16,7 @@ import { PopoverTrigger, } from "@/components/ui/popover"; import { ScrollArea } from "@/components/ui/scroll-area"; +import { Textarea } from "@/components/ui/textarea"; import { cn } from "@/lib/utils"; import { Check, ChevronsUpDown } from "lucide-react"; import * as React from "react"; @@ -144,12 +145,20 @@ export function ModelPickerView({ {field.value && ( - - + + {/* {JSON.stringify(field.value, null, 2)} - + */} + { + // Update field.onChange to pass the array of selected models + field.onChange(JSON.parse(e.target.value)); + }} + /> )} diff --git a/web/src/components/custom-form/SnapshotPickerView.tsx b/web/src/components/custom-form/SnapshotPickerView.tsx index 5e287a4..aa6849d 100644 --- a/web/src/components/custom-form/SnapshotPickerView.tsx +++ b/web/src/components/custom-form/SnapshotPickerView.tsx @@ -16,7 +16,7 @@ import { PopoverContent, PopoverTrigger, } from "@/components/ui/popover"; -import { ScrollArea } from "@/components/ui/scroll-area"; +import { Textarea } from "@/components/ui/textarea"; import { cn } from "@/lib/utils"; import { findAllDeployments } from "@/server/curdDeploments"; import { Check, ChevronsUpDown } from "lucide-react"; @@ -31,13 +31,16 @@ export function SnapshotPickerView({ {field.value && ( - - - - {JSON.stringify(field.value, null, 2)} - - - + // + { + // Update field.onChange to pass the array of selected models + field.onChange(JSON.parse(e.target.value)); + }} + /> + // )} );
{JSON.stringify(field.value, null, 2)}
- {JSON.stringify(field.value, null, 2)} -