Hi Johannes and thanks so much for your contribution. I am using Vaadin 14 and I dont see how to format NumberField with desired number of decimals, … Could this extension be ‘extended’ also for NumberField?
Kind regards,
Fermin!
Hi Johannes and thanks so much for your contribution. I am using Vaadin 14 and I dont see how to format NumberField with desired number of decimals, … Could this extension be ‘extended’ also for NumberField?
Kind regards,
Fermin!
Quickly trying out it seems that NumberField does some conflicting things with this formatter. You can call NumberField.setStep(0.001), if you for example want to limit the valid values three decimals. I knoe, it’s not exactly what you are looking for.
Thanks Johannes, I tried setStep but as you said that does not work.
I think it would be useful for Vaadin NumberField API to have a constructor with a NumberRenderer with a NumberFormat as Grid Columns have.
Or a simple method to set the number of FractionDigits.
Is it possible to choose the rounding mode when using
new NumeralFieldFormatter(" ", “,”, 1);
Unfortunately, there isn’t an option to set the rounding with the formatter.