Bug happens whenever I try to mask or instantiate a new Inputmask in my component. Was it suppose to work with StencilJS? Thanks for advices
import { Component, h, Host } from '@stencil/core';
import Inputmask from 'inputmask';
@Component({
tag: 'custom-input',
shadow: false,
})
export class CustomInput {
componentDidLoad() {
const inputElement = document.querySelector('input');
// It is not a constructor
var im = new Inputmask('99-9999999');
im.mask(inputElement);
// It is not a function
//Inputmask({ mask: '99-9999999' }).mask(inputElement);
}
render() {
return (
<Host>
<input type="text"></input>
</Host>
);
}
}
npm install inputmask --save