File tree 3 files changed +6
-2
lines changed
3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,10 @@ export default class FieldCoreBase<
88
88
this . setState ( { submitted } ) ;
89
89
}
90
90
91
+ public resetState = ( ) => {
92
+ this . setState ( { submitted : false , touched : false } ) ;
93
+ }
94
+
91
95
public isValid = ( ) => {
92
96
return ! this . state . errorMessage && ! this . props . errorMessage ;
93
97
}
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ export default class ValidationContext extends React.PureComponent<{}> {
21
21
}
22
22
23
23
public reset = ( ) : void => {
24
- this . fields . forEach ( f => f . setFormSubmitted ( false ) ) ;
24
+ this . fields . forEach ( f => f . resetState ( ) ) ;
25
25
}
26
26
27
27
private checkValidation = ( ) : boolean => {
Original file line number Diff line number Diff line change 9
9
" validation" ,
10
10
" material"
11
11
],
12
- "version" : " 1.0.3 " ,
12
+ "version" : " 1.0.5 " ,
13
13
"main" : " ./dist/index.js" ,
14
14
"types" : " ./dist/index.d.ts" ,
15
15
"license" : " MIT" ,
You can’t perform that action at this time.
0 commit comments