Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
initTextField = ele => ele && this.componentInstances.push(
new MDCTextField(ele));
tfRef = (el) => el && new MDCTextField(el);
installed() {
this.mdc = new MDCTextField(this.root)
}
componentDidUpdate() {
if (this.textField) {
this.textField.destroy();
this.textField = null;
}
if (this.tfEl) {
this.textField = new MDCTextField(this.tfEl);
}
}
initRef = (el) => {
if (el) {
this.tfEl = el;
this.textField = new MDCTextField(el);
}
};
<div> textFieldEl && new MDCTextField(textFieldEl)}>
{characterCounter && textarea ? : null}</div>