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.2k stars 812 forks source link

Typo in rating question prop #4266

Open mike-mike-mike-mike-mike opened 2 years ago

mike-mike-mike-mike-mike commented 2 years ago

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

Reporting a bug

What is the current behavior?

The syntax for adding a label to the minimum rating of the rating question type is currently mini**n**umRateDescription.

What is the expected behavior?

The prop should be named mini**m**umRateDescription

How would you reproduce the current behavior (if this is a bug)?

Add a rating element to your survey and add a mini**m**umRateDescription. You will see that this text does not render. Change the prop name to mini**n**umRateDescription and reload. You will now see your text.

Provide the test code and the tested page URL (if applicable)

Tested page URL:

Test code

No description appears:

elements: [
    {
      name: 'satisfaction',
      title: 'How satisfied are you with your experience?',
      minimumRateDescription: 'Not satisfied at all',
      maximumRateDescription: 'Very satisfied',
      type: 'rating'
    },
  ]
};

Description appears:

elements: [
    {
      name: 'satisfaction',
      title: 'How satisfied are you with your experience?',
      mininumRateDescription: 'Not satisfied at all',
      maximumRateDescription: 'Very satisfied',
      type: 'rating'
    },
  ]
};

Specify your

andrewtelnov commented 2 years ago

@mike-mike-mike-mike-mike The correct name is "minRateDescription". Here is the properties declarations:

    {
      name: "minRateDescription",
      alternativeName: "mininumRateDescription",
      serializationProperty: "locMinRateDescription",
    },
    {
      name: "maxRateDescription",
      alternativeName: "maximumRateDescription",
      serializationProperty: "locMaxRateDescription",
    },

We have fixed the typo a lot of time ago.

Thank you, Andrew