added fix for disabling dropdown (#2203)

This commit is contained in:
Aditya Bist
2018-08-10 11:07:54 -07:00
committed by GitHub
parent e5096e61e5
commit 5fa740ead4
2 changed files with 13 additions and 4 deletions

View File

@@ -324,13 +324,21 @@ export class SelectBoxList implements ISelectBoxDelegate, IDelegate<ISelectOptio
// Style parent select
// {{SQL CARBON EDIT}}
let background = null;
let foreground = null;
let border = null;
if (this.selectElement) {
background = this.styles.selectBackground ? this.styles.selectBackground.toString() : null;
const foreground = this.styles.selectForeground ? this.styles.selectForeground.toString() : null;
const border = this.styles.selectBorder ? this.styles.selectBorder.toString() : null;
if (this.selectElement.disabled) {
background = (<any>this.styles).disabledSelectBackground ? (<any>this.styles).disabledSelectBackground.toString() : null;
foreground = (<any>this.styles).disabledSelectForeground ? (<any>this.styles).disabledSelectForeground.toString() : null;
border = null;
} else {
background = this.styles.selectBackground ? this.styles.selectBackground.toString() : null;
foreground = this.styles.selectForeground ? this.styles.selectForeground.toString() : null;
border = this.styles.selectBorder ? this.styles.selectBorder.toString() : null;
}
this.selectElement.style.backgroundColor = background;
this.selectElement.style.color = foreground;
this.selectElement.style.borderColor = border;