Skip to content

Commit

Permalink
Work for surveyjs/survey-creator#4371 - added component container to …
Browse files Browse the repository at this point in the history
…completed page (#6978)

Co-authored-by: tsv2013 <[email protected]>
  • Loading branch information
tsv2013 and tsv2013 authored Sep 19, 2023
1 parent 748d579 commit dae9720
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<ng-template [component]="{ name: 'sv-components-container', data: { survey: model, container: 'footer', needRenderWrapper: false } }"></ng-template>
<div *ngIf="model.state === 'completed' && model.showCompletedPage" [class]="model.completedCss"
[innerHtml]="model.processedCompletedHtml"></div>
<ng-template *ngIf="model.state === 'completed' && model.showCompletedPage" [component]="{ name: 'sv-components-container', data: { survey: model, container: 'completePage' } }"></ng-template>
<div *ngIf="model.state === 'completedbefore'" [class]="model.completedBeforeCss"
[innerHtml]="model.processedCompletedBeforeHtml"></div>
<div *ngIf="model.state === 'loading'" [class]="model.loadingBodyCss" [innerHtml]="model.processedLoadingHtml"></div>
Expand Down
6 changes: 6 additions & 0 deletions packages/survey-vue3-ui/src/Survey.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@
v-html="getProcessedCompletedHtml()"
:class="vueSurvey.completedCss"
></div>
<component
:is="'sv-components-container'"
:survey="vueSurvey"
:container="'completePage'"
:needRenderWrapper="true"
></component>
</div>
<div
v-if="vueSurvey.state === 'completedbefore'"
Expand Down
1 change: 1 addition & 0 deletions src/knockout/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
<!-- /ko -->
<!-- ko if: state == "completed" && showCompletedPage -->
<div data-bind="html: processedCompletedHtml, css: completedCss"></div>
<!-- ko component: { name: "sv-components-container", params: { survey: $data, container: "completePage", needRenderWrapper: false } } --><!-- /ko -->
<!-- /ko -->
<!-- ko if: state == "completedbefore" -->
<div data-bind="html: locCompletedBeforeHtml.koRenderedHtml, css: completedBeforeCss"></div>
Expand Down
1 change: 1 addition & 0 deletions src/react/reactSurvey.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ export class Survey extends SurveyElementBase<any, any>
dangerouslySetInnerHTML={htmlValue}
className={this.survey.completedCss}
/>
<ComponentsContainer survey={this.survey} container={"completePage"} needRenderWrapper={false}></ComponentsContainer>
</React.Fragment>
);
}
Expand Down
1 change: 1 addition & 0 deletions src/vue/survey.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
v-html="getProcessedCompletedHtml()"
:class="vueSurvey.completedCss"
></div>
<component :is="'sv-components-container'" :survey="vueSurvey" :container="'completePage'"></component>
</div>
<div
v-if="vueSurvey.state === 'completedbefore'"
Expand Down

0 comments on commit dae9720

Please sign in to comment.