you should keep the input value in the state, and update it when typing:
constructor(props) {
super(props);
this.state = { filterEventValue: '' };
}
filterEventUsers = (e) => {
console.log("e ::", e.target);
this.setState({ filterEventValue: e.target.value });
}
render() {
return (
<input type="text" value={filterEventValue} name='filterEventValue'
autocomplete="off" onChange={this.filterEventUsers.bind(this)} />
)
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…