react-numeric
Advanced tools
Comparing version 0.3.0 to 0.4.0
@@ -103,7 +103,10 @@ "use strict"; | ||
return _react2.default.createElement("input", { | ||
var inputProps = {}; | ||
['className', 'style', 'disabled', 'type', 'name', 'tabIndex', 'unselectable'].forEach(function (prop) { | ||
return inputProps[prop] = _this2.props[prop]; | ||
}); | ||
return _react2.default.createElement("input", _extends({ | ||
ref: function ref(_ref) { | ||
return _this2.input = _ref; | ||
}, | ||
type: this.props.type, | ||
onChange: function onChange(e) { | ||
@@ -126,6 +129,4 @@ return _this2.callEventHandler(e, "onChange"); | ||
return _this2.callEventHandler(e, "onKeyDown"); | ||
}, | ||
className: this.props.className, | ||
style: this.props.style | ||
}); | ||
} | ||
}, inputProps)); | ||
} | ||
@@ -144,2 +145,6 @@ }]); | ||
style: _propTypes2.default.object, | ||
disabled: _propTypes2.default.bool, | ||
name: _propTypes2.default.string, | ||
tabIndex: _propTypes2.default.number, | ||
unselectable: _propTypes2.default.bool, | ||
value: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number]), | ||
@@ -210,5 +215,6 @@ onChange: _propTypes2.default.func, | ||
outputFormat: "number", | ||
preDefined: {} | ||
preDefined: {}, | ||
className: 'asdf' | ||
}; | ||
var predefinedOptions = exports.predefinedOptions = _autonumeric2.default.getPredefinedOptions(); |
{ | ||
"name": "react-numeric", | ||
"description": "A react component for formatted number form fields", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"repository": { | ||
@@ -6,0 +6,0 @@ "type": "git", |
@@ -58,6 +58,15 @@ import React from "react"; | ||
render() { | ||
const inputProps = {}; | ||
[ | ||
'className', | ||
'style', | ||
'disabled', | ||
'type', | ||
'name', | ||
'tabIndex', | ||
'unselectable' | ||
].forEach(prop => inputProps[prop] = this.props[prop]) | ||
return ( | ||
<input | ||
ref={ref => (this.input = ref)} | ||
type={this.props.type} | ||
onChange={e => this.callEventHandler(e, "onChange")} | ||
@@ -69,4 +78,3 @@ onFocus={e => this.callEventHandler(e, "onFocus")} | ||
onKeyDown={e => this.callEventHandler(e, "onKeyDown")} | ||
className={this.props.className} | ||
style={this.props.style} | ||
{...inputProps} | ||
/> | ||
@@ -81,2 +89,6 @@ ); | ||
style: PropTypes.object, | ||
disabled: PropTypes.bool, | ||
name: PropTypes.string, | ||
tabIndex: PropTypes.number, | ||
unselectable: PropTypes.bool, | ||
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), | ||
@@ -148,4 +160,5 @@ onChange: PropTypes.func, | ||
preDefined: {}, | ||
className: 'asdf', | ||
}; | ||
export const predefinedOptions = AutoNumeric.getPredefinedOptions(); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
304327
793