Merge pull request #651 from betagouv/quickfix

Corrige les décimales à rallonge dans les inputs de taux
pull/653/head
Johan Girod 2019-09-04 18:12:52 +02:00 committed by GitHub
commit c348fee8a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ export var FormDecorator = formType => RenderField =>
setFormValue(name, value),
...(unit === '%'
? {
format: x => (x == null ? null : x * 100),
format: x => (x == null ? null : +(x * 100).toFixed(2)),
normalize: x => (x == null ? null : x / 100)
}
: {})