Skip to content

Commit 7206d95

Browse files
committed
[2.7.8] Do deep equal of initialValues via lodash.isEqual on updated
1 parent 554c8d2 commit 7206d95

File tree

4 files changed

+21
-3
lines changed

4 files changed

+21
-3
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 2.7.8
2+
3+
### Fixed
4+
5+
- Do deep equal of `initialValues` via `lodash.isEqual` on `updated`
6+
17
## 2.7.7
28

39
### Fixed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ See demo at [https://detools.github.io/vue-form](https://detools.github.io/vue-f
8080

8181
## Changelog
8282

83+
- [2.7.8](/CHANGELOG.md#278)
8384
- [2.7.7](/CHANGELOG.md#277)
8485
- [2.7.6](/CHANGELOG.md#276)
8586
- [2.7.5](/CHANGELOG.md#275)

VueForm/components/Form/Form.js

+13-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
1-
import { isNil, isBoolean, isEmpty, has, mapValues, union, merge, without, omit } from 'lodash'
1+
import {
2+
isNil,
3+
isBoolean,
4+
isEmpty,
5+
isEqual,
6+
has,
7+
mapValues,
8+
union,
9+
merge,
10+
without,
11+
omit,
12+
} from 'lodash'
213
import { Form, Button } from 'element-ui'
314
import CONSTANTS from '../../constants'
415
import { validate, asyncValidate } from '../../validators/validate'
@@ -44,7 +55,7 @@ export default {
4455
},
4556

4657
updated() {
47-
if (this.defaultInitialValues !== this.initialValues) {
58+
if (!isEqual(this.defaultInitialValues, this.initialValues)) {
4859
this.defaultInitialValues = this.initialValues
4960
this.reinitializeValues(this.initialValues)
5061
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@detools/vue-form",
3-
"version": "2.7.7",
3+
"version": "2.7.8",
44
"description": "Form State Management for VueJS",
55
"main": "VueForm/index.js",
66
"scripts": {

0 commit comments

Comments
 (0)