Skip to content

Commit c98234d

Browse files
OlgaLarinaOlgaLarina
and
OlgaLarina
authored
Matrix column question edit dialog. Theming issue. (#6732)
* resolve #6707 Matrix column question edit dialog. Theming issue. * work for #6707 update etalons --------- Co-authored-by: OlgaLarina <olga.larina.dev@gmail.com>
1 parent 38f7310 commit c98234d

File tree

11 files changed

+16
-7
lines changed

11 files changed

+16
-7
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
<ng-template #template>
2-
<ng-template [component]="{ name: componentName, data: componentData }"></ng-template>
2+
<div [style]="style">
3+
<ng-template [component]="{ name: componentName, data: componentData }"></ng-template>
4+
</div>
35
</ng-template>

packages/survey-creator-angular/src/question-editor.component.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ import { Question, SurveyModel } from "survey-core";
77
templateUrl: "./question-editor.component.html"
88
})
99
export class QuestionEditorComponent extends EmbeddedViewContentComponent {
10-
@Input() survey!: SurveyModel
10+
@Input() survey!: SurveyModel;
11+
@Input() style!: any;
12+
1113
get question(): Question {
1214
return this.survey.getAllQuestions()[0];
1315
}

packages/survey-creator-core/src/components/matrix-cell.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import { SurveyCreatorModel } from "../creator-base";
1717
import { toggleHovered } from "../utils/html-element-utils";
1818
import { SurveyHelper } from "../survey-helper";
1919
import { editorLocalization } from "../editorLocalization";
20+
import designTabSurveyThemeJSON from "../designTabSurveyThemeJSON";
2021

2122
import "./matrix-cell.scss";
2223

@@ -99,7 +100,8 @@ export class MatrixCellWrapperViewModel extends Base {
99100
componentName: "svc-question-editor-content",
100101
data: {
101102
survey: editSurvey.survey,
102-
creator: this.creator
103+
creator: this.creator,
104+
style: designTabSurveyThemeJSON.cssVariables
103105
},
104106
onApply: () => {
105107
editSurvey.apply();

packages/survey-creator-react/src/QuestionEditorContent.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import * as React from "react";
66
interface IQuestionEditorContentComponentProps {
77
creator: SurveyCreatorModel;
88
survey: SurveyModel;
9+
style: any;
910
}
1011

1112
export class QuestionEditorContentComponent extends React.Component<
@@ -40,9 +41,9 @@ export class QuestionEditorContentComponent extends React.Component<
4041
render(): React.JSX.Element {
4142
const question = this.survey.getAllQuestions()[0];
4243
return (
43-
<>
44+
<div style={this.props.style} >
4445
<SurveyQuestion creator={this} element={question}></SurveyQuestion>
45-
</>
46+
</div>
4647
);
4748
}
4849
}

packages/survey-creator-vue/src/QuestionEditor.vue

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
<template>
2-
<SvComponent :is="componentName" v-bind="componentData"></SvComponent>
2+
<div :style="props.style">
3+
<SvComponent :is="componentName" v-bind="componentData"></SvComponent>
4+
</div>
35
</template>
46
<script lang="ts" setup>
57
import { SvComponent } from "survey-vue3-ui";
68
import type { SurveyModel } from "survey-core";
79
import { computed } from "vue";
810
9-
const props = defineProps<{ survey: SurveyModel }>();
11+
const props = defineProps<{ survey: SurveyModel; style: any }>();
1012
1113
const question = computed(() => props.survey?.getAllQuestions()[0]);
1214
Loading
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)