Skip to content

Latest commit

 

History

History
48 lines (39 loc) · 919 Bytes

README.MD

File metadata and controls

48 lines (39 loc) · 919 Bytes

react-virtual-input

React component for virtual input.

size:

  • 12K react-virtual-input.js
  • 52K react-virtual-input.js.map

properties:

  static propTypes = {
    className:PropTypes.string,
    value:PropTypes.string,
    onClear:PropTypes.func,
  };

usage:

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>
    );
  }
}

resource: