Skip to content

Commit ba6bba6

Browse files
committed
[2.7.1] Merge values for submit instead of destructuring
1 parent 3e15808 commit ba6bba6

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 2.7.1
2+
3+
### Fixed
4+
5+
— Merge values for submit instead of destructuring
6+
17
## 2.7.0
28

39
### Added

README.md

Lines changed: 1 addition & 0 deletions
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.1](/CHANGELOG.md#271)
8384
- [2.7.0](/CHANGELOG.md#270)
8485
- [2.6.1](/CHANGELOG.md#261)
8586
- [2.6.0](/CHANGELOG.md#260)

VueForm/components/Form/Form.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { isNil, isBoolean, isEmpty, has, mapValues, union } from 'lodash'
1+
import { isNil, isBoolean, isEmpty, has, mapValues, union, merge } from 'lodash'
22
import { Form, Button } from 'element-ui'
33
import CONSTANTS from '../../constants'
44
import { validate, asyncValidate } from '../../validators/validate'
@@ -231,7 +231,7 @@ export default {
231231

232232
const off = this.manageSubmittingState()
233233
const submitForm = () =>
234-
Promise.resolve(this.handleSubmit({ ...this.initialValues, ...this.state }))
234+
Promise.resolve(this.handleSubmit(merge({}, this.initialValues, this.state)))
235235

236236
const submitPromise = this.form.validating
237237
? Promise.all(Object.values(this.asyncValidations)).then(submitForm)

package.json

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

0 commit comments

Comments
 (0)