Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function initSelects() {
console.log('\tSelects');
var components = document.querySelectorAll('.mdc-select');
for (var i = 0; i < components.length; i++) {
var component = components[i];
if (!component.vComponent) {
component.vComponent = new VSelect(component, MDCSelect.attachTo(component));
}
}
}
mounted () {
this.mdcSelect = MDCSelect.attachTo(this.$el)
this.mdcSelect.valid = this.valid
this.mdcSelect.required = this.required
this.slotObserver = new MutationObserver(() => this.updateSlots())
this.slotObserver.observe(this.$el, {
childList: true,
subtree: true
})
this.updateSlots()
},
beforeDestroy () {