diff --git a/src/survey.ts b/src/survey.ts index ac37483f3c..eeed5a7c97 100644 --- a/src/survey.ts +++ b/src/survey.ts @@ -7417,7 +7417,6 @@ export class SurveyModel extends SurveyElementCore const advHeader = new Cover(); advHeader.fromTheme(theme); this.insertAdvancedHeader(advHeader); - this.headerView = "advanced"; } if (key === "isPanelless") { this.isCompact = theme[key]; diff --git a/tests/surveytests.ts b/tests/surveytests.ts index 1e84e599e6..acc0631b6e 100644 --- a/tests/surveytests.ts +++ b/tests/surveytests.ts @@ -18366,6 +18366,12 @@ QUnit.test("Do not run defaultValueExpression on survey.data, #7423", function ( assert.deepEqual(q3.value, [], "q3.value #3"); assert.notOk(q4.value, "q4.value #3"); }); +QUnit.test("theme assignment doesn't affect headerView", function (assert) { + let survey = new SurveyModel({}); + assert.equal(survey.headerView, "basic", "default value"); + survey.theme = { header: {} } as any; + assert.equal(survey.headerView, "basic", "keep default value"); +}); QUnit.test("defaultValueExpression expression stops working after survey.clear(), #7448", function (assert) { const survey = new SurveyModel({ elements: [ @@ -18385,4 +18391,4 @@ QUnit.test("defaultValueExpression expression stops working after survey.clear() survey.clear(); q1.value = 4; assert.equal(q2.value, 4, "defaultValueExpression is working after set value directly & clear"); -}); \ No newline at end of file +});