fix: fixed input for desktop

This commit is contained in:
2025-09-08 11:13:49 +04:00
parent 0515dd8a49
commit c4381d86c7

View File

@ -23,6 +23,7 @@ const InPlaceInputDesktop: FC<Props> = ({
useEffect(() => { useEffect(() => {
if (isWriting && inputRef.current) { if (isWriting && inputRef.current) {
setLocalValue(value);
inputRef.current.focus(); inputRef.current.focus();
} }
}, [isWriting]); }, [isWriting]);
@ -49,7 +50,6 @@ const InPlaceInputDesktop: FC<Props> = ({
}; };
const onCancelCreating = () => { const onCancelCreating = () => {
setLocalValue("");
setIsWriting(false); setIsWriting(false);
}; };
@ -58,7 +58,6 @@ const InPlaceInputDesktop: FC<Props> = ({
if (val) { if (val) {
onChange(val); onChange(val);
} }
setLocalValue("");
setIsWriting(false); setIsWriting(false);
}; };