Skip to content

Commit

Permalink
Hide multipletext itemSize property fix surveyjs/service#1813 (#7908)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtelnov authored Feb 28, 2024
1 parent afeda67 commit eeabdc8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/question_multipletext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ Serializer.addClass(
"multipletext",
[
{ name: "!items:textitems", className: "multipletextitem", isArray: true },
{ name: "itemSize:number", minValue: 0 },
{ name: "itemSize:number", minValue: 0, visible: false },
{ name: "colCount:number", default: 1, choices: [1, 2, 3, 4, 5] },
{ name: "itemErrorLocation", default: "default", choices: ["default", "top", "bottom"], visible: false },
{ name: "itemTitleWidth", category: "layout" }
Expand Down
5 changes: 5 additions & 0 deletions tests/question_multipletexttests.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Serializer } from "../src/jsonobject";
import { QuestionMultipleTextModel } from "../src/question_multipletext";
import { SurveyModel } from "../src/survey";

Expand Down Expand Up @@ -241,3 +242,7 @@ QUnit.test("defaultValueExpression executing", (assert) => {
q1.items[1].value = 5;
assert.equal(q1.items[2].editor.value, 15, "Calculated correctly");
});
QUnit.test("Make itemSize invisible by default", (assert) => {
const prop = Serializer.findProperty("multipletext", "itemSize");
assert.strictEqual(prop.visible, false);
});

0 comments on commit eeabdc8

Please sign in to comment.