Skip to content

A comment area value is not updated when setting a comment in code #9696

Closed
@andrewtelnov

Description

@andrewtelnov

The text area value is not updated on setting the question comment/other value in the code
Please review the following code and example. It doesn't work correctly:

    const survey = new Survey.Model(json);
    survey.addNavigationItem({ title: "Set comment", action: () => { 
        survey.setComment("car", "new value"); 
        alert(survey.getQuestionByName("car").comment);
        }})
    survey.onComplete.add((sender, options) => {
        console.log(JSON.stringify(sender.data, null, 3));
    });
    survey.data = { car: "other", "car-Comment": "Some text" };

The following issue is the result of this issue.

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions