@capillarytech/creatives-library 8.0.290-alpha.0 → 8.0.290-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -369,6 +369,10 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
369
369
|
}
|
|
370
370
|
this.props.getFormSubscriptionData(this.getFormData());
|
|
371
371
|
this.setState({ pendingGetFormData: false, startValidation: false });
|
|
372
|
+
} else if (this.state.pendingGetFormData && !isFormValid) {
|
|
373
|
+
// When the user clicked "Done" and validation failed, discard the save intent so that
|
|
374
|
+
// fixing the error later doesn't auto-submit. The user must click "Done" again.
|
|
375
|
+
this.setState({ pendingGetFormData: false, startValidation: false });
|
|
372
376
|
}
|
|
373
377
|
});
|
|
374
378
|
}
|
|
@@ -335,6 +335,10 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
335
335
|
}
|
|
336
336
|
this.props.getFormSubscriptionData(this.getFormData());
|
|
337
337
|
this.setState({ pendingGetFormData: false, startValidation: false });
|
|
338
|
+
} else if (this.state.pendingGetFormData && !isFormValid) {
|
|
339
|
+
// When the user clicked "Done" and validation failed, discard the save intent so that
|
|
340
|
+
// fixing the error later doesn't auto-submit. The user must click "Done" again.
|
|
341
|
+
this.setState({ pendingGetFormData: false, startValidation: false });
|
|
338
342
|
}
|
|
339
343
|
});
|
|
340
344
|
}
|