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.12k stars 802 forks source link

Special values dont have labels in matrix questions #8279

Closed SamMousa closed 4 months ago

SamMousa commented 4 months ago

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

Bug

What is the current behavior?

Special values (none, dontknow, refuse) don't have their labels rendered when used inside a matrix column. image

What is the expected behavior?

It should "just work".

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

Either paste the JSON below, or follow these steps:

  1. Go to https://surveyjs.io/create-free-survey
  2. Add a multi-select matrix
  3. For the first column click the pencil
  4. Change cell input type to radio button group****
  5. Under choice options check enable the none option --- Note: you see the question rendered correctly in the designer area
  6. Check each option in a separate column under general -- Note: you now see the question rendered incorrectly in the designer area

The preview shows the same issue. This bug also applies to refuse and dontknow, which are not enabled on surveyjs.io.

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

Tested page URL: https://surveyjs.io/create-free-survey

Test code

{
 "pages": [
  {
   "name": "page1",
   "elements": [
    {
     "type": "matrixdropdown",
     "name": "question1",
     "columns": [
      {
       "name": "Column 1",
       "cellType": "radiogroup",
       "showInMultipleColumns": true,
       "showNoneItem": true,
       "noneText": "None abc"
      }
     ],
     "choices": [
      1,
      2,
      3,
      4,
      5
     ],
     "rows": [
      "Row 1",
      "Row 2"
     ]
    }
   ]
  }
 ]
}

Specify your

andrewtelnov commented 4 months ago

@SamMousa If you put "choices" property inside the column then it will work. We will take a look, but in 90% cases developers use "choices" inside columns

Thank you, Andrew