adopted-ember-addons / adopted-ember-addons/ember-inputmask

one-way-input-mask with custom mask does not work after upgrade

Ouverte
#114 1 commentaire 1 réaction 0 personnes assignées Voir sur GitHub
Underlying Library
Langage dominant
JavaScript
Étoiles
67
Forks
43
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

Hi,
following setup worked properly with ember-inputmask versions < 0.7
```javascript
//mask-definition
import Inputmask from 'inputmask';

export function initialize(/* application */) {
Inputmask.extendAliases({
euro: {
suffix: " €",
groupSeparator: ".",
radixPoint: ",",
alias: "numeric",
placeholder: "0",
autoGroup: !0,
digits: 2,
digitsOptional: !1,
clearMaskOnLostFocus: !1,
autoUnmask: true,
unmaskAsNumber: true
}
});
}

export default {
initialize
};

```
```javascript
{{one-way-input-mask value=12.58 mask="euro"}}
```
![image](https://user-images.githubusercontent.com/9987680/70909674-4192eb80-200e-11ea-95f8-005742672c5c.png)
Since ember-inputmask > 0.7, the same output results in following output:
![image](https://user-images.githubusercontent.com/9987680/70909743-66875e80-200e-11ea-9d7e-9462b7fb84db.png)
The given value (12.58) is multiplicated by 100. Why?
Can you help me?

thank you

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Start by reproducing the snippet from the issue in ember-inputmask versions before and after 0.7, using a custom Inputmask alias named euro and {{one-way-input-mask value=12.58 mask="euro"}}. Then compare the upgrade behavior around custom aliases and numeric unmasking. Done means the masked value no longer appears multiplied by 100 for this case.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
javascript
Domaine
frontend
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
28/100

Recevez les nouvelles issues par e-mail

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