From c4381d86c7ab3558eaa14f8aeff6e70b7807fc7b Mon Sep 17 00:00:00 2001 From: AlexSserb Date: Mon, 8 Sep 2025 11:13:49 +0400 Subject: [PATCH] fix: fixed input for desktop --- src/components/ui/InPlaceInput/InPlaceInputDesktop.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/ui/InPlaceInput/InPlaceInputDesktop.tsx b/src/components/ui/InPlaceInput/InPlaceInputDesktop.tsx index 0a58ac2..e30b5a0 100644 --- a/src/components/ui/InPlaceInput/InPlaceInputDesktop.tsx +++ b/src/components/ui/InPlaceInput/InPlaceInputDesktop.tsx @@ -23,6 +23,7 @@ const InPlaceInputDesktop: FC = ({ useEffect(() => { if (isWriting && inputRef.current) { + setLocalValue(value); inputRef.current.focus(); } }, [isWriting]); @@ -49,7 +50,6 @@ const InPlaceInputDesktop: FC = ({ }; const onCancelCreating = () => { - setLocalValue(""); setIsWriting(false); }; @@ -58,7 +58,6 @@ const InPlaceInputDesktop: FC = ({ if (val) { onChange(val); } - setLocalValue(""); setIsWriting(false); };