Answer the question
In order to leave comments, you need to log in
How to add an input value to the handler function argument?
There is an input:
<input onChange={this.getChangeBonusType(здесь передать значение этого инпута)}/>
<input onChange={(event) => this.getChangeBonusType(event.target.value)}/>
!!
Answer the question
In order to leave comments, you need to log in
getChangeBonusType = (argument) => () => {
console.log(argument);
}
Like this
//...
getChangeBonusTypeHandler = (event) => this.getChangeBonusType(event.target.value);
//...
render() {
return <input onChange={this.getChangeBonusTypeHandler}/>
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question