diff --git a/src/components/Renameable.tsx b/src/components/Renameable.tsx index bda3e38..da0485d 100644 --- a/src/components/Renameable.tsx +++ b/src/components/Renameable.tsx @@ -16,7 +16,9 @@ const Renameable: React.FC = (props) => { useEffect(()=>{ if (props.edit){ + const i = inputValue.lastIndexOf(".") inputRef.current?.select() + inputRef.current?.setSelectionRange(0,i == -1?inputValue.length:i) }else{ setinputValue(props.text) }