parttio / textfieldformatter

TextField Formatter Vaadin add-on
Apache License 2.0
13 stars 9 forks source link

Request - `NumeralFieldFormatter` should extend a `NumberField` vaadin component #74

Open Alexenon opened 1 month ago

Alexenon commented 1 month ago

I found confusing that NumeralFieldFormatter cannot extend a NumberField vaadin component. I would like to be able to extend a number field using the NumeralFieldFormatter. It's annoying to parse always the values from String to Double and vice-versa 😢

NumberField priceField = new NumberField("Price");

Please add such functionality

new NumeralFieldFormatter.Builder()
        .delimiter(",")
        .decimalMark(".")
        .decimalScale(2)
        .build()
        .extend(priceField); // Currently, it's not possible to extend a number field