Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
attached() {
this.myMdcSelect = new MDCSelect(this.element.firstElementChild);
this.myMdcSelect.listen('change', () => {
this.selected = this.myMdcSelect.value;
//Set invalid class after first change
if(!this.myMdcSelect.value && this.required) {
this.requiredChanged(true);
} else {
this.requiredChanged(false);
}
});
this.refreshOptions();
}
_proto.attached = function attached() {
var _this = this;
this.myMdcSelect = new _mdcSelect.MDCSelect(this.element.firstElementChild);
this.myMdcSelect.listen('change', function () {
_this.changedEvent = true;
_this.selected = _this.myMdcSelect.value; //Set invalid class after first change
if (!_this.myMdcSelect.value && _this.required) {
_this.requiredChanged(true);
} else {
_this.requiredChanged(false);
}
_this.changedEvent = false;
});
this.refreshOptions();
};
attached() {
this.myMdcSelect = new MDCSelect(this.element.firstElementChild);
this.myMdcSelect.listen('change', () => {
this.changedEvent = true;
this.selected = this.myMdcSelect.value;
//Set invalid class after first change
if (!this.myMdcSelect.value && this.required) {
this.requiredChanged(true);
} else {
this.requiredChanged(false);
}
this.changedEvent = false;
});
this.refreshOptions();
bind() {
this.myMdcSelect = new MDCSelect(this.element);
this.myMdcSelect.disabled = this.disabled;
if (this.selected) {
this.addFloatingLabel();
}
}
MdcSelect.prototype.bind = function bind() {
this.myMdcSelect = new _mdcSelect.MDCSelect(this.element);
this.myMdcSelect.disabled = this.disabled;
if (this.selected) {
this.addFloatingLabel();
}
};