From 08c009cce5cabe3acec2c07f147c844840d44a92 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Fri, 3 Jul 2026 21:46:55 -0700 Subject: [PATCH] fix(ui): forward ref on shadcn Input so rename auto-focus works on React 18 Input didn't wrap its function component in React.forwardRef, so the ref ConversationList passes for rename auto-focus/select silently never attached under React 18 (function components need forwardRef to receive a ref; that requirement is dropped in React 19, but this app is on 18.3.1). --- .../src/components/ui/input.tsx | 34 +++++++++++-------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/ui/litellm-dashboard/src/components/ui/input.tsx b/ui/litellm-dashboard/src/components/ui/input.tsx index 71764ec27b2..e0effafef6e 100644 --- a/ui/litellm-dashboard/src/components/ui/input.tsx +++ b/ui/litellm-dashboard/src/components/ui/input.tsx @@ -2,20 +2,24 @@ import * as React from "react"; import { cn } from "@/lib/cva.config"; -function Input({ className, type, ...props }: React.ComponentProps<"input">) { - return ( - - ); -} +const Input = React.forwardRef>( + ({ className, type, ...props }, ref) => { + return ( + + ); + }, +); +Input.displayName = "Input"; export { Input };