From 0ab4c41f9ede84d964506c2f5784ae0519f47ee5 Mon Sep 17 00:00:00 2001 From: "Roberto.silva" Date: Tue, 27 Jan 2026 14:32:06 -0600 Subject: [PATCH] Se corrige incidencia fix #30 --- src/routes/planes/$planId/_detalle/route.tsx | 35 ++++++++++---------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/src/routes/planes/$planId/_detalle/route.tsx b/src/routes/planes/$planId/_detalle/route.tsx index 90eb180..f8f19c6 100644 --- a/src/routes/planes/$planId/_detalle/route.tsx +++ b/src/routes/planes/$planId/_detalle/route.tsx @@ -7,7 +7,7 @@ import { CalendarDays, Save, } from 'lucide-react' -import { useState, useEffect } from 'react' +import { useState, useEffect, forwardRef } from 'react' import { Badge } from '@/components/ui/badge' import { Button } from '@/components/ui/button' @@ -145,7 +145,7 @@ function RouteComponent() { {/* 3. Cards de Información con Context Menu */}
- + } label="Nivel" @@ -221,31 +221,32 @@ function RouteComponent() { ) } -function InfoCard({ - icon, - label, - value, - isEditable, -}: { - icon: React.ReactNode - label: string - value: string | number | undefined - isEditable?: boolean -}) { +const InfoCard = forwardRef< + HTMLDivElement, + { + icon: React.ReactNode + label: string + value: string | number | undefined + isEditable?: boolean + } & React.HTMLAttributes +>(function InfoCard( + { icon, label, value, isEditable, className, ...props }, + ref, +) { return (
{icon}
- {' '} - {/* min-w-0 es vital para que el truncate funcione en flex */}

{label}

@@ -255,7 +256,7 @@ function InfoCard({
) -} +}) function Tab({ to,