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.21k stars 814 forks source link

Rating question display mode breaks css classes functionality #7699

Closed SamMousa closed 9 months ago

SamMousa commented 10 months ago

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

Bug

What is the current behavior?

When setting displayMode to buttons the root css classes of a rating question are no longer applied.

What is the expected behavior?

It should just work.

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

See example below.

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

Tested page URL: https://codesandbox.io/p/sandbox/stoic-marco-wd7rwn

Specify your

SamMousa commented 10 months ago

I've found through experimentation that in dropdown mode it applies the rootDropdown class. I feel that it should however also still apply the root class.

SamMousa commented 9 months ago

I'm not sure how the fix is supposed to work, but if I set something like this it doesn't work:

    survey.onUpdateQuestionCssClasses.add((sender, options) => {
            options.cssClasses.root += " test123";
    });

Checking the original demo which uses survey-core latest it still shows as broken.