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); };