rename dont select file ext
This commit is contained in:
		
							parent
							
								
									1354383860
								
							
						
					
					
						commit
						61387e9fd8
					
				@ -16,7 +16,9 @@ const Renameable: React.FC<Props> = (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)
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user