adopted-ember-addons / adopted-ember-addons/ember-inputmask
Clearer api for working with masked or unmasked value
- Vorherrschende Sprache
- JavaScript
- Sterne
- 67
- Forks
- 43
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Right now it's very confusing when to pass an unmasked value or a masked value to the component. I'm thinking it would be better if users of the component were explicit about which value they cared to work with. An API I think might be good would be something like this:
```
```
In this scenario the developer passed the `maskedValue` in and so the `update` action would return the `maskedValue` as the first argument and the `unmaskedValue` as the 2nd argument.
```
```
In this scenario the developer passed the `unmaskedValue` in and so the `update` action would return the `unmaskedValue` as the first argument and the `maskedValue` as the 2nd argument.
It would be an error to pass both the `unmaskedValue` and `maskedValue` to the component.
We would deprecate passing `value` in as a positional param to help move developers to being explicit about which type of format they want to use.
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.