fix: fixed input for desktop
This commit is contained in:
@ -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);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user