๐ - Formcontrol setValue does't work with ion-input
pedrobruneli opened this issue ยท 2 comments
pedrobruneli commented
Which package(s) are the source of the bug?
@maskito/core, @maskito/angular
Playground Link
https://stackblitz.com/edit/angular-ylu2ag?file=src%2Fapp%2Fexample.component.html
Description
When i try to setValue in ion-input, the input fills without any mask
Maskito version
2.0.2
Which browsers have you used?
- Chrome
- Firefox
- Safari
- Edge
Which operating systems have you used?
- macOS
- Windows
- Linux
- iOS
- Android
nsbarsukov commented
@pedrobruneli Hello!
- If you have direct access to native
<input />
/<textarea />
, just importMaskitoCVA
. Learn more: https://maskito.dev/frameworks/angular#cva - If you do not have direct access to these native elements (e.g. you use Maskito with custom angular elements), use
maskitoTransform
. Learn more: https://maskito.dev/core-concepts/transformer
nsbarsukov commented
setValue() {
this.control.setValue(
maskitoTransform('2222222222222222', this.cardMask)
);
}