surveyjs / survey-library

Free JavaScript form builder library with integration for React, Angular, Vue, jQuery, and Knockout.
https://surveyjs.io/form-library
MIT License
4.01k stars 780 forks source link

Yes/No question shows Yes/Yes when the swap option is enabled #8346

Closed missakation closed 4 weeks ago

missakation commented 1 month ago

Are you requesting a feature, reporting a bug or asking a question?

Reporting a bug

What is the current behavior?

When I have a boolean component and the option "Swap the order of yes and no" is set to yes, it shows yes/yes when I select yes.

What is the expected behavior?

It should show yes/no

Screenshot 2024-05-31 at 8 15 03 PM

andrewtelnov commented 1 month ago

@missakation Please provide your boolean question json.

Thank you, Andrew

missakation commented 1 month ago

@missakation Please provide your boolean question json.

Thank you, Andrew

{ type: "boolean", name: "is_enabled", minWidth: "100px", startWithNewLine: false, title: "Is Enabled", hideNumber: true, defaultValue: "true", },

andrewtelnov commented 1 month ago

@missakation It works fine to me.

Thank you, Andrew

missakation commented 1 month ago

@missakation It works fine to me.

Thank you, Andrew

Oh sorry try this:

  {
   "type": "boolean",
   "name": "is_enabled",
   "minWidth": "100px",
   "startWithNewLine": false,
   "title": "Is Enabled",
   "hideNumber": true,
   "defaultValue": "true",
   "swapOrder": true
  },

  The swap option should be on
andrewtelnov commented 1 month ago

@missakation Yes, there is the issue here.

Thank you, Andrew