Field that must have a mask along with the virtual keyboard.
<div fxLayout='column' fxFlex='24'>
<mat-form-field>
<input matInput placeholder='CPF' formControlName='cpf' [textMask]='{mask: cpfMask}'
[matKeyboard]="'Portugu\u00eas Brasileiro'" [darkTheme]='true'>
<mat-error *ngIf='formSolicitante.controls.cpf.errors'>{{getErrorMessage(formSolicitante.controls.cpf)}}</mat-error>
</mat-form-field>
</div>
Mask
cpfMask = (rawValue: string): (string | RegExp)[] => {
return [/\d/, /\d/, /\d/, '.', /\d/, /\d/, /\d/, '.', /\d/, /\d/, /\d/, '-', /\d/, /\d/];
}
When I type the physical keyboard.
WhenIdialthevirtualkeyboard