bug
Custom css class for dropdown question not applied
Class(es) specified in dropdown property applied to select elements
Create survey with dropdown question, use css: {"dropdown":"form-control"} and observe markup does not have class "form-control" applied
@adamfoley, hello! May be you should use root property:
var myCss = {
dropdown: {root: "form-control"}
};
Could you try it please?
The root property does work, but this adds a class to the parent div of select. I also tried item, select and dropdown properties, but none of them seem to work. I also tried to duplicate this in plunker using jquery, but the custom CSS applies to the select element as expected in that case. Could my problem by specific to my survey model?
@adamfoley as I understand you have the plunk with survey-jquery and it works. And jquery-angular doesn't. Am I right? Could you share your non working example?
Here is a plunk demonstrating: https://plnkr.co/edit/Tmra6aRmb4JKWBfRetiZ
@adamfoley thanks, now I see the problem. I think you should use control property:
https://plnkr.co/edit/YSNJTfvqs52L4aGAcpv5?p=preview is it ok for you ?
var css = { dropdown: {control: "form-group"} };
Yes, that will work, thanks! Consider adding the control property to the overridable classes in the example here: http://surveyjs.org/examples/angular/survey-customcss.html
The availability of control property was unknown to me, but maybe I just didn't know where to look for reference to it.
Thanks again.
@adamfoley yes we don't have this property in our example, thanks, we'll add it.
you can find all properties here: https://github.com/surveyjs/surveyjs/blob/master/src/defaultCss/cssbootstrap.ts
and we are working on documentation :)