Closed zichaolim closed 8 years ago
This is basic operation for react in general, I recommend reading more tutorials on reactjs. Anyway here's a advanced use case example:
class TestComponent extends React.Component {
constructor() {
super();
this.onChange = this._onChange.bind(this);
}
_onChange(data) {
// Your function goes here
console.log(data);
}
render() {
return (
<Dropdown
style={{ height: 20, width: 200}}
...
onChange={this.onChange} />
);
}
}
how to call to a function when it trigger onChange ? Please provide an example. Thanks.