Skip to content

Commit

Permalink
Logic tab incorrectly renders new question types under "set answer" fix
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtelnov authored Jan 5, 2024
1 parent 57b2bb6 commit cec9622
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ export class LogicItemEditor extends PropertyEditorSetupValue {
if (selectorsNames.indexOf(question.name) < 0 && (parentName === "triggerEditorPanel" || parentName === "setValueIfPanel")) {
const qType = question.getType();
assignDefaultV2Classes(cssClasses, qType);
if(!defaultV2Css[qType]) {
if(!defaultV2Css[qType] && propertyGridCss[qType]) {
copyCssClasses(cssClasses, propertyGridCss.question);
copyCssClasses(cssClasses, propertyGridCss[qType]);
}
Expand Down
5 changes: 3 additions & 2 deletions packages/survey-creator-core/tests/tabs/logic.tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3180,8 +3180,9 @@ test("SurveyLogicItem, setValue css", () => {
expect(panel.getQuestionByName("logicTypeName").value).toBe("trigger_setvalue");
const triggerEditorPanel = <PanelModel>panel.getElementByName("triggerEditorPanel");
const setValueQuestion = triggerEditorPanel.getQuestionByName("setValue");
expect(setValueQuestion.cssClasses.mainRoot.indexOf("svc-logic-question-value")).toBeTruthy();
expect(setValueQuestion.contentQuestion.cssClasses.mainRoot.indexOf("svc-logic-question-value")).toBeTruthy();
expect(setValueQuestion.cssClasses.mainRoot.indexOf("svc-logic-question-value") > -1).toBeTruthy();
expect(setValueQuestion.contentQuestion.cssClasses.mainRoot.indexOf("svc-logic-question-value") > -1).toBeTruthy();
expect(setValueQuestion.cssClasses.mainRoot.indexOf("spg-question") > -1).toBeFalsy();
ComponentCollection.Instance.clear();
});
test("Test questions css in an action panel", () => {
Expand Down

0 comments on commit cec9622

Please sign in to comment.