Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
disable() {
addClass(this.el, cls.DISABLED);
}
highlight() {
if (!this.isDisabled()) {
addClass(this.el, cls.HIGHLIGHT);
this.el.focus();
}
}
changeSelected(selected) {
this.selected = this.nativeEl.selected = selected;
if (selected) {
addClass(this.el, SELECTED_CLASS_NAME);
} else {
removeClass(this.el, SELECTED_CLASS_NAME);
}
}
changeHighlight(highlight) {
if (highlight) {
addClass(this.el, HIGHLIGHT_CLASS_NAME);
} else {
removeClass(this.el, HIGHLIGHT_CLASS_NAME);
}
}
disable() {
this.disabled = this.nativeEl.disabled = true;
addClass(this.labelEl, cls.DISABLED);
this.items.forEach(item => item.disableItemGroup());
}
makeDisable() {
this.nativeEl.disabled = true;
addClass(this.el, cls.DISABLED);
}
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);
}
}
}
initializeContainer(manager) {
manager.appendChild(this.container);
css(this.container, {
display: 'none',
position: 'absolute',
'z-index': manager.zIndex
});
addClass(this.container, 'floating-layer');
}