mobx-react-form
Advanced tools
Comparing version 1.13.11 to 1.13.12
@@ -374,3 +374,3 @@ 'use strict'; | ||
value: function clear() { | ||
var deep = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; | ||
var deep = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; | ||
@@ -384,3 +384,5 @@ this.resetValidation(); | ||
// recursive clear fields | ||
if (deep) this.deepAction('clear', this.fields); | ||
if (deep && this.fields.size) { | ||
this.deepAction('clear', this.fields); | ||
} | ||
} | ||
@@ -390,3 +392,3 @@ }, { | ||
value: function reset() { | ||
var deep = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; | ||
var deep = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; | ||
@@ -398,3 +400,5 @@ var useDefaultValue = this.$default !== this.$initial; | ||
// recursive clear fields | ||
if (deep) this.deepAction('reset', this.fields); | ||
if (deep && this.fields.size) { | ||
this.deepAction('reset', this.fields); | ||
} | ||
} | ||
@@ -401,0 +405,0 @@ }, { |
{ | ||
"name": "mobx-react-form", | ||
"license": "MIT", | ||
"version": "1.13.11", | ||
"version": "1.13.12", | ||
"author": "Claudio Savino <claudio.savino@me.com> (https://twitter.com/foxhound87)", | ||
@@ -6,0 +6,0 @@ "description": "Automagically manage React forms state and automatic validation with MobX.", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
1942471
14097