embark/embark-ui
Pascal Precht 8a5871e606 fix(@embark/cockpit/converter): allow decimal numbers
Prior to this commit, it wasn't possible to enter decimal numbers
with dots. The reason for that is that all units are recalculated
on form control change and values like `2.` are simply converted to
`2`.

As every change will cause a `setState()` in Cockpit, users never had
a chance to get "beyond" the first dot of their input value.

This is now fixed by preventing the recalculation all together when
the last character in the entered value is a `.`

In that case, we simply update the form control using `setState()` and
don't touch all the other values. The next key stroke will cause a full
recalculation again.
2018-12-11 11:56:31 +01:00
..
2018-10-23 10:22:38 +02:00

embark-ui