File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Expand file tree Collapse file tree 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<
8888 this . setState ( { submitted } ) ;
8989 }
9090
91+ public resetState = ( ) => {
92+ this . setState ( { submitted : false , touched : false } ) ;
93+ }
94+
9195 public isValid = ( ) => {
9296 return ! this . state . errorMessage && ! this . props . errorMessage ;
9397 }
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ export default class ValidationContext extends React.PureComponent<{}> {
2121 }
2222
2323 public reset = ( ) : void => {
24- this . fields . forEach ( f => f . setFormSubmitted ( false ) ) ;
24+ this . fields . forEach ( f => f . resetState ( ) ) ;
2525 }
2626
2727 private checkValidation = ( ) : boolean => {
Original file line number Diff line number Diff line change 99 " validation" ,
1010 " material"
1111 ],
12- "version" : " 1.0.3 " ,
12+ "version" : " 1.0.5 " ,
1313 "main" : " ./dist/index.js" ,
1414 "types" : " ./dist/index.d.ts" ,
1515 "license" : " MIT" ,
You can’t perform that action at this time.
0 commit comments