Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

remove focus from input

// Use focus() && blur() to add or remove focus.
import { useRef } from "react"

const inputRef = useRef()

// To remove focus: inputRef.current.blur()
// To focus: inputRef.current.focus()
<input ref='inputRef' {...value} />
 
PREVIOUS NEXT
Tagged: #remove #focus #input
ADD COMMENT
Topic
Name
4+4 =