attached() { const {base} = this.refs; const {inputElement} = base.refs; this._vanillaTextMask = vanillaTextMask({ inputElement, mask: this.getInputMask(), placeholderChar: '_', showMask: true }); }
applyMask() { const {dataType, element} = this; const inputElement = element.querySelector('input'); if (this.maskInstance) { this.maskInstance.destroy(); } const numberMaskOptions = this.getMaskConfig(dataType); const mask = createNumberMask(numberMaskOptions); this.maskInstance = vanillaTextMask({ inputElement, mask }); }