diff --git a/src/question_matrixdropdownbase.ts b/src/question_matrixdropdownbase.ts index 9ecc7b1c6c..3ff0ceb78f 100644 --- a/src/question_matrixdropdownbase.ts +++ b/src/question_matrixdropdownbase.ts @@ -1245,6 +1245,9 @@ export class QuestionMatrixDropdownModelBase extends QuestionMatrixBaseModel obj.isSelectCellType() }, { name: "placeholder", alternativeName: "optionsCaption", serializationProperty: "locPlaceholder" }, { diff --git a/tests/question_matrixdropdownbasetests.ts b/tests/question_matrixdropdownbasetests.ts index 45c30217e7..e1e8dc1156 100644 --- a/tests/question_matrixdropdownbasetests.ts +++ b/tests/question_matrixdropdownbasetests.ts @@ -1530,4 +1530,23 @@ QUnit.test("Check if errors disappered in the cells in the current row on changi q2.value = 1; assert.equal(q1.errors.length, 0, "q1 errors #2"); assert.equal(q2.errors.length, 0, "q2 errors #2"); -}); \ No newline at end of file +}); +QUnit.test("choices property visibility, Bug#8560", function (assert) { + const survey = new SurveyModel({ + elements: [ + { + type: "matrixdynamic", + name: "matrix" + } + ] + }); + const matrix = survey.getQuestionByName("matrix"); + const prop = Serializer.findProperty("matrixdynamic", "choices"); + assert.equal(prop.isVisible("", matrix), true, "#1"); + matrix.cellType = "text"; + assert.equal(prop.isVisible("", matrix), false, "#2"); + matrix.cellType = "checkbox"; + assert.equal(prop.isVisible("", matrix), true, "#3"); + matrix.cellType = "comment"; + assert.equal(prop.isVisible("", matrix), false, "#4"); +});