conditionally render the checkbox

This commit is contained in:
Greg Saab 2025-10-08 13:04:50 -04:00
commit 6facce3fc1

View file

@ -178,12 +178,16 @@ const ToolsTab = ({
htmlFor={key} htmlFor={key}
className="text-sm font-medium text-gray-700 dark:text-gray-300" className="text-sm font-medium text-gray-700 dark:text-gray-300"
> >
Null null
</label> </label>
</div> </div>
) : null} ) : null}
</div> </div>
<div
role="toolinputwrapper"
className={`${prop.nullable && params[key] === null ? "pointer-events-none opacity-50" : ""}`}
>
{prop.type === "boolean" ? ( {prop.type === "boolean" ? (
<div className="flex items-center space-x-2 mt-2"> <div className="flex items-center space-x-2 mt-2">
<Checkbox <Checkbox
@ -232,7 +236,8 @@ const ToolsTab = ({
}} }}
className="mt-1" className="mt-1"
/> />
) : prop.type === "object" || prop.type === "array" ? ( ) : prop.type === "object" ||
prop.type === "array" ? (
<div className="mt-1"> <div className="mt-1">
<DynamicJsonForm <DynamicJsonForm
ref={(ref) => (formRefs.current[key] = ref)} ref={(ref) => (formRefs.current[key] = ref)}
@ -318,6 +323,7 @@ const ToolsTab = ({
</div> </div>
)} )}
</div> </div>
</div>
); );
}, },
)} )}