react-bsonschema-form
Advanced tools
Comparing version 0.41.15 to 0.41.16
@@ -35,2 +35,6 @@ "use strict"; | ||
function round(value) { | ||
return parseFloat(value).toFixed(2); | ||
} | ||
function DoubleField(props) { | ||
@@ -40,2 +44,5 @@ return _react2.default.createElement(_StringField2.default, _extends({}, props, { | ||
return props.onChange(convert(value)); | ||
}, | ||
onBlur: function onBlur(event) { | ||
return props.onChange(convert(round(event.target.value))); | ||
} })); | ||
@@ -50,2 +57,3 @@ } | ||
onChange: _react.PropTypes.func.isRequired, | ||
onBlur: _react.PropTypes.func, | ||
formData: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string, _react.PropTypes.object]), | ||
@@ -52,0 +60,0 @@ required: _react.PropTypes.bool, |
@@ -30,3 +30,4 @@ "use strict"; | ||
registry = props.registry, | ||
onChange = props.onChange; | ||
onChange = props.onChange, | ||
onBlur = props.onBlur; | ||
var title = schema.title, | ||
@@ -48,4 +49,8 @@ format = schema.format; | ||
var Widget = (0, _utils.getWidget)(schema, widget, widgets); | ||
var inputProps = {}; | ||
if (onBlur) { | ||
inputProps.onBlur = onBlur; | ||
} | ||
return _react2.default.createElement(Widget, { | ||
return _react2.default.createElement(Widget, _extends({}, inputProps, { | ||
options: _extends({}, options, { enumOptions: enumOptions }), | ||
@@ -63,3 +68,3 @@ schema: schema, | ||
registry: registry, | ||
placeholder: placeholder }); | ||
placeholder: placeholder })); | ||
} | ||
@@ -73,2 +78,3 @@ | ||
onChange: _react.PropTypes.func.isRequired, | ||
onBlur: _react.PropTypes.func, | ||
formData: _react.PropTypes.oneOfType([_react2.default.PropTypes.string, _react2.default.PropTypes.number, _react2.default.PropTypes.object]), | ||
@@ -75,0 +81,0 @@ registry: _react.PropTypes.shape({ |
{ | ||
"name": "react-bsonschema-form", | ||
"version": "0.41.15", | ||
"version": "0.41.16", | ||
"description": "A simple React component capable of building HTML forms out of a JSON schema.", | ||
@@ -5,0 +5,0 @@ "scripts": { |
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
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 2 instances in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
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
3885027
44
5103
2
3