You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Field with formatting NumeralFieldFormatter(",", ".", 2) will format
1200.049 → 1,200.04 (rounding issue)
1.200,00 → 1.20 (wrong symbols in input)
Example 2
Field with formatting CustomStringBlockFormatter.Builder().blocks(3, 3, 3).delimiters("-") will format
123 456 789 → 123- 45-6 7 (spaces taken as characters)
Example 3
Field with formatting IBANFormatter.fromIBANLength(18) will format
GB29 NWBK 6016 1331 9268 19 → GB29 NWBK 6016 1331 92 (dropping last numbers due to limited length)
Improvement idea
As generic solution, component should recognize if inputted characters are cut out. This is mainly an issue when pasting in values.
Component could also indicate if user is trying to type in a field that has already reached the max number of characters.
The text was updated successfully, but these errors were encountered:
juuso-vaadin
changed the title
Pasting formatted values may drop information without user noticing
Pasting value may drop information without user noticing
Jun 24, 2024
Here's a sample for small wiggle animation that could indicate that field cannot accept input. This can be due to max limit reached or trying to enter a character that is not allowed. https://codepen.io/juuso-vaadin/pen/QWXLErW
Example 1
Field with formatting
NumeralFieldFormatter(",", ".", 2)
will formatExample 2
Field with formatting
CustomStringBlockFormatter.Builder().blocks(3, 3, 3).delimiters("-")
will formatExample 3
Field with formatting
IBANFormatter.fromIBANLength(18)
will formatImprovement idea
As generic solution, component should recognize if inputted characters are cut out. This is mainly an issue when pasting in values.
Component could also indicate if user is trying to type in a field that has already reached the max number of characters.
The text was updated successfully, but these errors were encountered: