File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -921,9 +921,16 @@ export class FormStore {
921
921
const { recursive, dirty } = options || { } ;
922
922
923
923
this . getFieldEntities ( true ) . forEach ( ( field : FieldEntity ) => {
924
+ const fieldNamePath = field . getNamePath ( ) ;
925
+
924
926
// Add field if not provide `nameList`
925
927
if ( ! provideNameList ) {
926
- namePathList . push ( field . getNamePath ( ) ) ;
928
+ if ( field . isList ( ) ) {
929
+ if ( namePathList . find ( name => name . toString ( ) . includes ( fieldNamePath . toString ( ) ) ) ) {
930
+ return ;
931
+ }
932
+ }
933
+ namePathList . push ( fieldNamePath ) ;
927
934
}
928
935
929
936
// Skip if without rule
@@ -936,7 +943,6 @@ export class FormStore {
936
943
return ;
937
944
}
938
945
939
- const fieldNamePath = field . getNamePath ( ) ;
940
946
validateNamePathList . add ( fieldNamePath . join ( TMP_SPLIT ) ) ;
941
947
942
948
// Add field validate rule in to promise list
@@ -1000,7 +1006,7 @@ export class FormStore {
1000
1006
const returnPromise : Promise < Store | ValidateErrorEntity | string [ ] > = summaryPromise
1001
1007
. then ( ( ) : Promise < Store | string [ ] > => {
1002
1008
if ( this . lastValidatePromise === summaryPromise ) {
1003
- return Promise . resolve ( this . getFieldsValue ( { strict : true } ) ) ;
1009
+ return Promise . resolve ( this . getFieldsValue ( namePathList ) ) ;
1004
1010
}
1005
1011
return Promise . reject < string [ ] > ( [ ] ) ;
1006
1012
} )
You can’t perform that action at this time.
0 commit comments