ampersand-input-view
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -64,3 +64,3 @@ var View = require('ampersand-view'); | ||
props: { | ||
value: 'string', | ||
value: 'any', | ||
startingValue: 'string', | ||
@@ -110,3 +110,7 @@ name: 'string', | ||
setValue: function () { | ||
this.input.value = this.value; | ||
if (!this.value) { | ||
this.input.value = ''; | ||
} else { | ||
this.input.value = String.prototype.toString.call(this.value); | ||
} | ||
if (!this.getErrorMessage(this.value)) { | ||
@@ -143,4 +147,7 @@ this.shouldValidate = true; | ||
} | ||
this.value = this.input.value; | ||
this.value = this.clean(this.input.value); | ||
}, | ||
clean: function (val) { | ||
return (this.type === 'number') ? Number(val) : val.trim(); | ||
}, | ||
handleBlur: function () { | ||
@@ -147,0 +154,0 @@ if (this.value && this.changed) { |
{ | ||
"name": "ampersand-input-view", | ||
"description": "A view module for intelligently rendering and validating input. Works well with ampersand-form-view.", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"author": "Henrik Joreteg <henrik@andyet.net>", | ||
@@ -6,0 +6,0 @@ "bugs": { |
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
9504
184