Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

semantic UI react focus on input

class InputExampleRefFocus extends Component {
  handleRef = (c) => {
    this.inputRef = c
  }

  focus = () => {
    this.inputRef.focus()
  }

  render() {
    return (
      <div>
        <Button content='focus' onClick={this.focus} />
        <Input ref={this.handleRef} placeholder='Search...' />
      </div>
    )
  }
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: pass status of checkbox to a function react js 
Javascript :: array.of 
Javascript :: normalizePort 
Javascript :: paging react mongoose 
Javascript :: creating a read stream from a large text file 
Javascript :: @webfilter objectify where we can use 
Javascript :: javascript if null use other value 
Javascript :: replace with regex capture group 
Javascript :: stop playing music when page is closed react 
Javascript :: fiter on redux state 
Javascript :: check string ifhas character in jquery 
Javascript :: setstate before function react 
Javascript :: Node.js passing parameters to client via express render 
Javascript :: hidden vue js 
Javascript :: button prssed value show in text javascript 
Javascript :: The syntax of ScrollBy() methods 
Javascript :: vscode multi level folder file creation 
Javascript :: 1update normalize-url 
Javascript :: google auto complete not show on modal 
Javascript :: exit forEach when null javascript 
Javascript :: movie-trailer usage 
Javascript :: check the constructor property to find out if an object is an Array (contains the word "Array"): 
Javascript :: material ui hide asterisk 
Javascript :: get day first 3 letters name in js 
Javascript :: alegato termino excluido 
Javascript :: vdio Javascript 
Javascript :: show each element of an array in a different line 
Javascript :: js load inside div from file 
Javascript :: addingbackground image in nodejs 
Javascript :: find js like 
ADD CONTENT
Topic
Content
Source link
Name
4+5 =