Skip to content

Commit 1461370

Browse files
committed
Changed flags to not reset on validate
1 parent 877495d commit 1461370

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/components/ValidatorArea.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,6 @@ export class ValidatorArea extends React.Component<ValidatorAreaProps, Validator
109109
} else {
110110
this.setState({
111111
pending: false,
112-
dirty: false,
113-
touched: false,
114112
valid: true
115113
}, () => {
116114
resolve(true);
@@ -178,11 +176,11 @@ export class ValidatorArea extends React.Component<ValidatorAreaProps, Validator
178176

179177
this.setState({
180178
touched: true
179+
}, () => {
180+
if (this.elementCanBlur(child)) {
181+
this.validate(ref);
182+
}
181183
});
182-
183-
if (this.elementCanBlur(child)) {
184-
this.validate(ref);
185-
}
186184
},
187185
onChange: (event: React.ChangeEvent): void => {
188186
if (child.props.onChange) {

0 commit comments

Comments
 (0)