Skip to content

Commit

Permalink
onComplete/onCompleting: Describe the completeTrigger parameter (
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanTsukanov committed Aug 18, 2023
1 parent 062c2d2 commit e1194fe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/survey-events-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,12 @@ export interface TriggerExecutedEvent {

export interface CompleteBaseEvent {
/**
* Returns `true` if survey completion is caused by the ["complete" trigger](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#complete).
* Returns `true` if survey completion is caused by a ["complete" trigger](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#complete).
*/
isCompleteOnTrigger: boolean;
/**
* A "complete" trigger that has been executed. This parameter has a value only if `options.isCompleteOnTrigger` is `true`.
*/
completeTrigger?: Trigger;
}
export interface CompletingEvent extends CompleteBaseEvent {
Expand Down
1 change: 1 addition & 0 deletions src/survey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4155,6 +4155,7 @@ export class SurveyModel extends SurveyElementCore
* The `doComplete()` method completes the survey regardless of validation errors and the current page. If you need to ensure that survey results are valid and full, call the [`completeLastPage()`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#completeLastPage) method instead.
*
* @param isCompleteOnTrigger For internal use.
* @param completeTrigger For internal use.
* @returns `false` if survey completion is cancelled within the [`onCompleting`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onCompleting) event handler; otherwise, `true`.
* @see surveyPostId
*/
Expand Down

0 comments on commit e1194fe

Please sign in to comment.