From ac3a466828cce193dad720fd9ff0aca60c0c7d91 Mon Sep 17 00:00:00 2001 From: gtarpenning Date: Fri, 15 Nov 2024 15:36:43 -0800 Subject: [PATCH] reviewcomments --- .../pages/ScorersPage/ZodSchemaForm.tsx | 72 ++++++++++--------- 1 file changed, 40 insertions(+), 32 deletions(-) diff --git a/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/ScorersPage/ZodSchemaForm.tsx b/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/ScorersPage/ZodSchemaForm.tsx index ae216dbb0f4b..2bb9063efa2a 100644 --- a/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/ScorersPage/ZodSchemaForm.tsx +++ b/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/ScorersPage/ZodSchemaForm.tsx @@ -156,12 +156,15 @@ const NestedForm: React.FC<{ config: Record; setConfig: (config: Record) => void; path: string[]; -}> = ({keyName, fieldSchema, config, setConfig, path}) => { + hideLabel?: boolean; +}> = ({keyName, fieldSchema, config, setConfig, path, hideLabel}) => { const currentPath = [...path, keyName]; const currentValue = getNestedValue(config, currentPath); const unwrappedSchema = unwrapSchema(fieldSchema); + console.log(typeof fieldSchema, fieldSchema); + if (unwrappedSchema instanceof z.ZodDiscriminatedUnion) { return ( -