项目作者: leovo2708

项目描述 :
ReactJS numeric textbox component
高级语言: JavaScript
项目地址: git://github.com/leovo2708/react-numeric-textbox.git
创建时间: 2018-09-04T08:48:18Z
项目社区:https://github.com/leovo2708/react-numeric-textbox

开源协议:

下载


react-numeric-textbox

An ReactJS numeric textbox component

Dependencies

Demo

https://leovo2708.github.io/react-numeric-textbox/

Installation

After install the above dependencies, install react-numeric-textbox via:

  1. npm install react-numeric-textbox --save

Usage

  1. <NumericTextboxComponent
  2. className={className}
  3. min={min}
  4. max={max}
  5. disabled={disabled}
  6. autoCorrect={autoCorrect}
  7. decimals={decimals}
  8. format={format}
  9. value={value}
  10. placeholder={placeholder}
  11. onChange={(event) => this.onChange(event)}
  12. onFocus={() => this.onFocus(event)}
  13. onBlur={() => this.onBlur(event)}
  14. onEnter={() => this.onEnter(event)}
  15. onEscape={() => this.onEscape(event)}
  16. />

API

  1. const propTypes = {
  2. className: PropTypes.string,
  3. min: PropTypes.number,
  4. max: PropTypes.number,
  5. value: PropTypes.number,
  6. placeholder: PropTypes.string,
  7. decimals: PropTypes.number,
  8. disabled: PropTypes.bool,
  9. format: PropTypes.string,
  10. autoCorrect: PropTypes.bool,
  11. onChange: PropTypes.func,
  12. onFocus: PropTypes.func,
  13. onBlur: PropTypes.func,
  14. onEnter: PropTypes.func,
  15. onEscape: PropTypes.func
  16. };

Contributing

I am very appreciate for your ideas, proposals and found bugs which you can leave in github issues. Thanks in advance!