fix bug on tooltip with div wrapping

This commit is contained in:
anovazzi1 2023-07-18 11:43:59 -03:00
commit 3aaeee42fe

View file

@ -83,6 +83,7 @@ export default function ParameterComponent({
}; };
useEffect(() => { useEffect(() => {
if (name === "openai_api_base") console.log(info);
infoHtml.current = ( infoHtml.current = (
<div className="h-full w-full break-words"> <div className="h-full w-full break-words">
{info.split("\n").map((line, i) => ( {info.split("\n").map((line, i) => (
@ -163,10 +164,13 @@ export default function ParameterComponent({
<div className=""> <div className="">
{info !== "" && ( {info !== "" && (
<ShadTooltip content={infoHtml.current}> <ShadTooltip content={infoHtml.current}>
{/* put div to avoid bug that does not display tooltip */}
<div>
<IconComponent <IconComponent
name="Info" name="Info"
TWstyle="relative bottom-0.5 ml-2 h-3 w-4" TWstyle="relative bottom-0.5 ml-2 h-3 w-4"
/> />
</div>
</ShadTooltip> </ShadTooltip>
)} )}
</div> </div>