fix: fixed input for desktop
This commit is contained in:
@ -23,6 +23,7 @@ const InPlaceInputDesktop: FC<Props> = ({
|
||||
|
||||
useEffect(() => {
|
||||
if (isWriting && inputRef.current) {
|
||||
setLocalValue(value);
|
||||
inputRef.current.focus();
|
||||
}
|
||||
}, [isWriting]);
|
||||
@ -49,7 +50,6 @@ const InPlaceInputDesktop: FC<Props> = ({
|
||||
};
|
||||
|
||||
const onCancelCreating = () => {
|
||||
setLocalValue("");
|
||||
setIsWriting(false);
|
||||
};
|
||||
|
||||
@ -58,7 +58,6 @@ const InPlaceInputDesktop: FC<Props> = ({
|
||||
if (val) {
|
||||
onChange(val);
|
||||
}
|
||||
setLocalValue("");
|
||||
setIsWriting(false);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user