From 9126813d84c635f690473d9aeaee6c037bfcb424 Mon Sep 17 00:00:00 2001 From: Andrew Telnov Date: Thu, 17 Aug 2023 15:57:41 +0300 Subject: [PATCH] Show tocLcation property if showTOC is true --- src/survey.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/survey.ts b/src/survey.ts index 13873e3a09..716453ef8e 100644 --- a/src/survey.ts +++ b/src/survey.ts @@ -7347,10 +7347,9 @@ Serializer.addClass("survey", [ name: "showTOC:switch", default: false }, - { - name: "tocLocation", - default: "left", - choices: ["left", "right"], + { name: "tocLocation", default: "left", choices: ["left", "right"], + dependsOn: ["showTOC"], + visibleIf: (survey: any) => { return !!survey && survey.showTOC; } }, { name: "mode", default: "edit", choices: ["edit", "display"] }, { name: "storeOthersAsComment:boolean", default: true }, @@ -7392,9 +7391,7 @@ Serializer.addClass("survey", [ { name: "questionStartIndex", dependsOn: ["showQuestionNumbers"], - visibleIf: function (survey: any) { - return !survey || survey.showQuestionNumbers !== "off"; - }, + visibleIf: (survey: any) => { return !survey || survey.showQuestionNumbers !== "off"; } }, { name: "questionTitlePattern",