surveyjs / survey-library

Free JavaScript form builder library with integration for React, Angular, Vue, jQuery, and Knockout.
https://surveyjs.io/form-library
MIT License
4.03k stars 785 forks source link

Radio groups "other" option is not cleared/hidden after changing option #3790

Closed pablorosalesps closed 2 years ago

pablorosalesps commented 2 years ago

Are you requesting a feature, reporting a bug or asking a question?

Reporting a bug for survey-react

What is the current behavior?

When using radio groups and the "other" option, if you choose "other" and write a comment, but then switch to another option, the comment box is not hidden/cleared.

What is the expected behavior?

The comment textarea should be hidden/cleared when changing option.

How would you reproduce the current behavior (if this is a bug)?

Provide the test code and the tested page URL (if applicable)

Tested page URL: https://surveyjs.io/Examples/Library?id=questiontype-radiogroup&platform=Reactjs&theme=modern

Test code (from the demo page)

Survey
    .StylesManager
    .applyTheme("modern");

var json = {
    "elements": [
        {
            "type": "radiogroup",
            "name": "car",
            "title": "What car are you driving?",
            "isRequired": true,
            "hasNone": true,
            "colCount": 4,
            "choices": [
                "Ford",
                "Vauxhall",
                "Volkswagen",
                "Nissan",
                "Audi",
                "Mercedes-Benz",
                "BMW",
                "Peugeot",
                "Toyota",
                "Citroen"
            ]
        }
    ]
};

window.survey = new Survey.Model(json);

survey
    .onComplete
    .add(function (sender) {
        document
            .querySelector('#surveyResult')
            .textContent = "Result JSON:\n" + JSON.stringify(sender.data, null, 3);
    });

ReactDOM.render(<Survey.Survey model={survey}/>, document.getElementById("surveyElement"));

Specify your

andrewtelnov commented 2 years ago

@pablorosalesps The bug has been fixed. Here is the related issue.

Thank you, Andrew

pablorosalesps commented 2 years ago

Great thanks!

pablorosalesps commented 2 years ago

Hey @andrewtelnov, quick question, every how often are releases done? Just so I can track them since we use SurveyJS for an important feature of our app and need to update to 1.9.3 when available on NPM. Plus track other releases/sprints.

andrewtelnov commented 2 years ago

@pablorosalesps We release weekly. Here is our sprint board.

Thank you, Andrew

pablorosalesps commented 2 years ago

Thanks!