React component for virtual input.
- 12K react-virtual-input.js
- 52K react-virtual-input.js.map
static propTypes = {
className:PropTypes.string,
value:PropTypes.string,
onClear:PropTypes.func,
};
class App extends React.Component{
state = {
value:'Hello react virtual input!'
};
_change = (e) =>{
this.setState({value:e.target.value})
};
_clear =(e) =>{
this.setState({value:''})
}
render(){
return (
<div className="hello-react-virtual-input">
<input type="text" value={this.state.value} onChange={this._change}/>
<ReactVirtualInput onClear={this._clear} value={this.state.value} />
</div>
);
}
}