File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -911,6 +911,8 @@ export class FormStore {
911911 ? nameList . map ( getNamePath )
912912 : [ ] ;
913913
914+ const removeListNameStrList : string [ ] = [ ] ;
915+
914916 // Collect result in promise list
915917 const promiseList : Promise < FieldError > [ ] = [ ] ;
916918
@@ -926,7 +928,7 @@ export class FormStore {
926928 // Add field if not provide `nameList`
927929 if ( ! provideNameList ) {
928930 if ( field . isList ( ) && namePathList . some ( name => matchNamePath ( name , fieldNamePath , true ) ) ) {
929- return ;
931+ removeListNameStrList . push ( fieldNamePath . toString ( ) ) ;
930932 }
931933 namePathList . push ( fieldNamePath ) ;
932934 }
@@ -1004,7 +1006,10 @@ export class FormStore {
10041006 const returnPromise : Promise < Store | ValidateErrorEntity | string [ ] > = summaryPromise
10051007 . then ( ( ) : Promise < Store | string [ ] > => {
10061008 if ( this . lastValidatePromise === summaryPromise ) {
1007- return Promise . resolve ( this . getFieldsValue ( namePathList ) ) ;
1009+ const filterListNameList = namePathList . filter (
1010+ name => ! removeListNameStrList . some ( nameStr => nameStr === name . toString ( ) ) ,
1011+ ) ;
1012+ return Promise . resolve ( this . getFieldsValue ( filterListNameList ) ) ;
10081013 }
10091014 return Promise . reject < string [ ] > ( [ ] ) ;
10101015 } )
You can’t perform that action at this time.
0 commit comments