File tree Expand file tree Collapse file tree 4 files changed +15
-5
lines changed
Expand file tree Collapse file tree 4 files changed +15
-5
lines changed Original file line number Diff line number Diff line change 1+ ## 2.5.3
2+
3+ ### Fixed
4+
5+ - Reinitialization for all values types except Array
6+
17## 2.5.2
28
39### Fixed
Original file line number Diff line number Diff line change @@ -79,6 +79,7 @@ See demo at [https://detools.github.io/vue-form](https://detools.github.io/vue-f
7979
8080## Changelog
8181
82+ - [ 2.5.3] ( /CHANGELOG.md#253 )
8283- [ 2.5.2] ( /CHANGELOG.md#252 )
8384- [ 2.5.1] ( /CHANGELOG.md#251 )
8485- [ 2.5.0] ( /CHANGELOG.md#250 )
Original file line number Diff line number Diff line change @@ -270,10 +270,13 @@ export default {
270270 } ,
271271
272272 reinitializeValues ( updatedInitialValues ) {
273- this . state = mapValues (
274- this . state ,
275- ( value , key ) => isNil ( updatedInitialValues [ key ] ) || ( Array . isArray ( value ) ? [ ] : undefined )
276- )
273+ this . state = mapValues ( this . state , ( value , key ) => {
274+ if ( ! isNil ( updatedInitialValues [ key ] ) ) {
275+ return updatedInitialValues [ key ]
276+ }
277+
278+ return Array . isArray ( value ) ? [ ] : undefined
279+ } )
277280 this . syncErrors = { }
278281 this . asyncErrors = { }
279282 this . touchedFields = { }
Original file line number Diff line number Diff line change 11{
22 "name" : " @detools/vue-form" ,
3- "version" : " 2.5.2 " ,
3+ "version" : " 2.5.3 " ,
44 "description" : " Form State Management for VueJS" ,
55 "main" : " VueForm/index.js" ,
66 "scripts" : {
You can’t perform that action at this time.
0 commit comments