Commit 66ffeb6 1 parent bf4e035 commit 66ffeb6 Copy full SHA for 66ffeb6
File tree 2 files changed +9
-1
lines changed
2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -2247,4 +2247,9 @@ test('field destroyed or display none should not be assign value from patch init
2247
2247
aa . initialValue = '123'
2248
2248
2249
2249
expect ( form . values ) . toEqual ( { } )
2250
+
2251
+ aa . display = 'visible'
2252
+
2253
+ expect ( aa . value ) . toBe ( '123' )
2254
+ expect ( form . values ) . toEqual ( { aa : '123' } )
2250
2255
} )
Original file line number Diff line number Diff line change @@ -201,7 +201,10 @@ export const patchFormValues = (
201
201
const targetField = form . query ( path ) . take ( )
202
202
const isUnVoidField = targetField && ! isVoidField ( targetField )
203
203
204
- if ( isUnVoidField && targetField . display === 'none' ) return
204
+ if ( isUnVoidField && targetField . display === 'none' ) {
205
+ targetField . caches . value = clone ( source )
206
+ return
207
+ }
205
208
206
209
if ( allowAssignDefaultValue ( targetValue , source ) ) {
207
210
update ( path , source )
You can’t perform that action at this time.
0 commit comments