Skip to content

Commit

Permalink
PR: KO: Survey doesn't have title and description if loaded via Surve…
Browse files Browse the repository at this point in the history
…yID (#7806)

* work for the surveyjs/private-tasks#366

* work for the surveyjs/private-tasks#366
  • Loading branch information
dmitry-kurmanov authored Feb 5, 2024
1 parent 0fa059d commit d4f7794
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/knockout/kosurvey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ export class SurveyImplementor extends ImplementorBase {
this.survey.disposeCallback = () => {
this.dispose();
};
this.survey["koRenderedHasHeader"] = ko.computed(()=>{
let renderedHtml = (<any>this.survey.locTitle).koRenderedHtml();
return this.survey.renderedHasHeader;
});
new ImplementorBase(this.survey.timerModel);
}
public render(element: any = null) {
Expand Down
2 changes: 1 addition & 1 deletion src/knockout/templates/header.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script type="text/html" id="survey-header">
<!-- ko if: renderedHasHeader -->
<!-- ko if: koRenderedHasHeader -->
<div data-bind="css: css.header">
<!-- ko if: isLogoBefore -->
<!-- ko component: { name: getElementWrapperComponentName($data, 'logo-image'), params: getElementWrapperComponentData($data, 'logo-image') } -->
Expand Down

0 comments on commit d4f7794

Please sign in to comment.