Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
makeEnable() {
this.nativeEl.disabled = false;
removeClass(this.el, cls.DISABLED);
}
dehighlight() {
removeClass(this.el, cls.HIGHLIGHT);
this.el.blur();
}
changeDisabled(disabled) {
if (this.disabled !== disabled) {
this.disabled = this.nativeEl.disabled = disabled;
if (disabled) {
addClass(this.el, DISABLED_CLASS_NAME);
} else {
removeClass(this.el, DISABLED_CLASS_NAME);
}
}
}
enable() {
this.disabled = this.nativeEl.disabled = false;
removeClass(this.labelEl, cls.DISABLED);
this.items.forEach(item => item.enableItemGroup());
}
changeSelected(selected) {
this.selected = this.nativeEl.selected = selected;
if (selected) {
addClass(this.el, SELECTED_CLASS_NAME);
} else {
removeClass(this.el, SELECTED_CLASS_NAME);
}
}
enable() {
this.nativeEl.disabled = false;
removeClass(this.el, cls.DISABLED);
}
changeOpened(opened) {
if (opened) {
removeClass(this.el, HIDDEN_CLASS_NAME);
if (this.selectedOption) {
this.highlight();
}
} else {
addClass(this.el, HIDDEN_CLASS_NAME);
this.dehighlight();
}
}
changeHighlight(highlight) {
if (highlight) {
addClass(this.el, HIGHLIGHT_CLASS_NAME);
} else {
removeClass(this.el, HIGHLIGHT_CLASS_NAME);
}
}
close() {
removeClass(this.el, cls.OPEN);
}