conditionally render the checkbox
This commit is contained in:
parent
9e74437dab
commit
6facce3fc1
1 changed files with 124 additions and 118 deletions
|
|
@ -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>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue