auto-views
Advanced tools
Comparing version 0.0.33 to 0.0.34
@@ -45,11 +45,7 @@ "use strict"; | ||
_this.onEntryChange = function (key, e) { | ||
if (e.target && _this.props.onChange) { | ||
var newValues = (_a = {}, | ||
_a[key] = e.target.value, | ||
_a); | ||
_this.props.onChange({ target: { | ||
value: newValues | ||
} }); | ||
if (_this.props.onChange) { | ||
_this.props.onChange([ | ||
{ "op": "replace", "path": "/" + key, "value": e.target.value } | ||
]); | ||
} | ||
var _a; | ||
}; | ||
@@ -56,0 +52,0 @@ return _this; |
@@ -39,13 +39,20 @@ "use strict"; | ||
var newValue; | ||
if (_this.props.type == 'number') { | ||
newValue = e.currentTarget.valueAsNumber; | ||
switch (_this.props.type) { | ||
case 'number': | ||
newValue = e.currentTarget.valueAsNumber; | ||
break; | ||
// case 'boolean': | ||
// newValue = e.currentTarget.checked; | ||
// break; | ||
default:// string | ||
newValue = e.currentTarget.value; | ||
break; | ||
} | ||
else { | ||
newValue = e.currentTarget.value; | ||
} | ||
if (e.target && _this.props.onChange) { | ||
e.stopPropagation(); | ||
_this.props.onChange({ target: { | ||
_this.props.onChange({ | ||
target: { | ||
value: newValue | ||
} }); | ||
} | ||
}); | ||
} | ||
@@ -52,0 +59,0 @@ }; |
{ | ||
"name": "auto-views", | ||
"version": "0.0.33", | ||
"version": "0.0.34", | ||
"description": "Common, fully-tested, strictly-typed, Wix-styled, auto views library", | ||
@@ -11,2 +11,3 @@ "main": "./lib/index.js", | ||
"prepublish": "npm run build", | ||
"pretest": "npm run build", | ||
"test": "npm run test:browser && npm run test:node", | ||
@@ -49,2 +50,3 @@ "test:browser": "karma start --single-run", | ||
"dependencies": { | ||
"jsonpatch": "^3.0.1", | ||
"jsonschema": "^1.1.1" | ||
@@ -51,0 +53,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
66516
919
3
+ Addedjsonpatch@^3.0.1
+ Addedjsonpatch@3.1.0(transitive)