ionic-team / ionic-team/ionic-framework

bug: Maskito ion-input does not work with ReactiveForms

Ouverte
#30,360 2 commentaires 2 réactions 0 personnes assignées Voir sur GitHub
triage
Langage dominant
TypeScript
Étoiles
52.7k
Forks
13.3k
Merge moyen
1 j 15 h
PR mergées (30 j)
51

Description

### Prerequisites

- [x] I have read the [Contributing Guidelines](https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#creating-an-issue).
- [x] I agree to follow the [Code of Conduct](https://ionicframework.com/code-of-conduct).
- [x] I have searched for [existing issues](https://github.com/ionic-team/ionic-framework/issues) that already report this problem, without success.

### Ionic Framework Version

v8.x

### Current Behavior

I extended the example from the documentation at https://ionicframework.com/docs/api/input#input-masking to ReactiveForms.
When executing FormControl setValue, the content in ion-input is not masked. But it works with a normal HTML input field.

### Expected Behavior

The ion-input should be masked in the same way as the standard HTML input field
![Image](https://github.com/user-attachments/assets/ec30794a-f696-441d-950b-da07f1be1251)

### Steps to Reproduce
`
Open https://stackblitz.com/edit/fpgq7vus-drpj2dkz and click the button

### Code Reproduction URL

https://stackblitz.com/edit/fpgq7vus-drpj2dkz

### Ionic Info

Ionic:

Ionic CLI : 7.2.0 (C:\Users\MWeier\AppData\Roaming\npm\node_modules\@ionic\cli)
Ionic Framework : @ionic/angular 8.5.4
@angular-devkit/build-angular : 19.2.7
@angular-devkit/schematics : 19.2.7
@angular/cli : 19.2.7
@ionic/angular-toolkit : 12.2.0

Capacitor:

Capacitor CLI : 7.2.0
@capacitor/android : not installed
@capacitor/core : 7.2.0
@capacitor/ios : not installed

Utility:

cordova-res : 0.15.4
native-run : 2.0.1

System:

NodeJS : v20.16.0 (C:\Program Files\nodejs\node.exe)
npm : 10.8.1
OS : Windows 10

### Additional Information

_No response_

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.