Skip to content

Commit

Permalink
fix(field): popup onchange validate
Browse files Browse the repository at this point in the history
  • Loading branch information
webyom committed Sep 10, 2020
1 parent fa6767c commit be3067a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/field/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,9 @@ export class Field<T = never> extends preact.Component<FieldProps<T>, FieldState
const { onClosePopup } = this.props;
if (confirm) {
this.setState({ showPopup: false, popupValue: this.formatReturnValue(this.inputRef.current.getValue()) }, () => {
this.validateWithTrigger('change').then(msg => {
msg === NO_MATCHED_RULE_FLAG || this.setState({ validateMessage: msg || '' });
});
onClosePopup && onClosePopup(this, confirm);
});
} else {
Expand Down

0 comments on commit be3067a

Please sign in to comment.