File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,10 @@ export class ConnectBase {
97
97
throw new Error ( `Unknown type of form element: ${ formElement . constructor . name } ` ) ;
98
98
}
99
99
100
- return pairs . filter ( p => ( < any > p . control ) . _parent === this . form . control ) ;
100
+ return pairs . filter ( p => {
101
+ const parent = ( p . control as any ) . _parent ;
102
+ return parent === this . form . control || parent === this . form ;
103
+ } ) ;
101
104
}
102
105
103
106
private resetState ( ) {
@@ -114,12 +117,10 @@ export class ConnectBase {
114
117
children . forEach ( c => {
115
118
const { path, control } = c ;
116
119
117
- const value = State . get ( this . getState ( ) , this . path . concat ( c . path ) ) ;
120
+ const value = State . get ( this . getState ( ) , this . path . concat ( path ) ) ;
118
121
119
122
if ( control . value !== value ) {
120
- const phonyControl = < any > { path : path } ;
121
-
122
- this . form . updateModel ( phonyControl , value ) ;
123
+ control . setValue ( value ) ;
123
124
}
124
125
} ) ;
125
126
}
You can’t perform that action at this time.
0 commit comments