Skip to content

Commit

Permalink
Yes/No question: Describe the swapOrder property
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanTsukanov committed Apr 9, 2024
1 parent 4049af1 commit 40b8e3e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/question_boolean.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,13 @@ export class QuestionBooleanModel extends Question {
return this.booleanValue !== null && this.booleanValue !== undefined;
}

/**
* Specifies whether to swap the order of the Yes and No answers.
*
* Default value: `false`
*
* By default, the order is [ "No", "Yes"]. Enable this property to reorder the answers as follows: [ "Yes", "No" ].
*/
@property({ defaultValue: false }) swapOrder: boolean;
get locLabelLeft(): LocalizableString {
return this.swapOrder ? this.getLocalizableString("labelTrue") : this.getLocalizableString("labelFalse");
Expand Down

0 comments on commit 40b8e3e

Please sign in to comment.