@hubsync/esign-web-sdk 6.5.7 → 6.5.8

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.
@@ -572,8 +572,11 @@ const VerdocsSign = class {
572
572
  const requiredFields = fillableFields.filter(field => !!field.required);
573
573
  const allRequiredFieldsSubmitted = requiredFields.every(field => this.isFieldValidForRecipient(field, recipientFields));
574
574
  const visitedFieldNames = new Set([...this.visitedFieldNames, ...extraVisitedFieldNames]);
575
- const allFieldsVisited = fillableFields.every(field => visitedFieldNames.has(field.name));
576
- const canSubmit = allRequiredFieldsSubmitted && allFieldsVisited;
575
+ // A field is considered "handled" if it's visited OR if it's an optional field that was skipped OR if it's already filled
576
+ const allFieldsHandled = fillableFields.every(field => visitedFieldNames.has(field.name) ||
577
+ this.skippedOptionalFields.includes(field.name) ||
578
+ this.isFieldFilledForNav(field, recipientFields));
579
+ const canSubmit = allRequiredFieldsSubmitted && allFieldsHandled;
577
580
  if (canSubmit) {
578
581
  this.nextButtonLabel = 'Finish';
579
582
  if (!this.nextSubmits) {