Skip to content

Commit

Permalink
chore: linter
Browse files Browse the repository at this point in the history
  • Loading branch information
simonadomnisoru committed Apr 25, 2024
1 parent e47e7ae commit 18b9335
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@ export class FormBuilder extends React.Component<Props> {
);
}


fieldInstances: Map<string, any>;
asyncUIState: { [id: string]: FieldUI };
fieldsValidatingPromiseContainer: FieldsValidatingPromiseContainer;
Expand Down Expand Up @@ -299,12 +298,13 @@ export class FormBuilder extends React.Component<Props> {

componentDidUpdate(prevProps: Props) {
const { fieldsUI, fields } = this.props;

if (!isEqual(prevProps.fieldsUI, fieldsUI)) {
const pendingValidationFields = Object.keys(fieldsUI).filter(key => fieldsUI[key].pendingValidation);

if (pendingValidationFields.length !== 0 && !this.validateAllCancelablePromise) {
const customFields = fields.filter(field => pendingValidationFields.includes(field.id));
this.validateFields(this.props, customFields);
const fieldsToValidate = fields.filter(field => pendingValidationFields.includes(field.id));
this.validateFields(this.props, fieldsToValidate);
}
}
}
Expand Down

0 comments on commit 18b9335

Please sign in to comment.