mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
fix(select): add the cssClass passed by the user to the alert for a select
fixes #6835
This commit is contained in:
@ -301,18 +301,23 @@ export class Select implements AfterContentInit, ControlValueAccessor, OnDestroy
|
||||
};
|
||||
});
|
||||
|
||||
var selectCssClass = 'select-alert';
|
||||
|
||||
// create the alert instance from our built up alertOptions
|
||||
overlay = new Alert(this._app, alertOptions);
|
||||
|
||||
if (this._multi) {
|
||||
// use checkboxes
|
||||
overlay.setCssClass('select-alert multiple-select-alert');
|
||||
|
||||
selectCssClass += ' multiple-select-alert';
|
||||
} else {
|
||||
// use radio buttons
|
||||
overlay.setCssClass('select-alert single-select-alert');
|
||||
selectCssClass += ' single-select-alert';
|
||||
}
|
||||
|
||||
// If the user passed a cssClass for the select, add it
|
||||
selectCssClass += alertOptions.cssClass ? ' ' + alertOptions.cssClass : '';
|
||||
overlay.setCssClass(selectCssClass);
|
||||
|
||||
overlay.addButton({
|
||||
text: this.okText,
|
||||
handler: (selectedValues: any) => {
|
||||
|
Reference in New Issue
Block a user