mirror of
https://github.com/minibits-cash/minibits_wallet.git
synced 2026-10-06 03:38:24 +00:00
"1000" confirmed as "1,00". Two mechanisms, both from writing the grouped string back into the controlled TextInput's value: - Android echoes a programmatically-set `value` back out through onChangeText, where handleTopChange rewrites the first comma to a dot (a decimal-comma keyboard types "1,5" and means 1.5). So "1,000" came back as "1.000". - maxLength was clipping. It caps typing, but Android's filter applies to programmatically-set text too, and the grouped form is longer than the number it shows. Stripping on focus was not enough, because it only closed the window the USER could reach — not the one the platform reaches on its own. State now holds the plain number and the grouped text is derived at render time, only while the field is unfocused. Losing focus is what confirms an amount, so that alone produces the requested behaviour, and derived text cannot be read back in as input. The typing cap moves from maxLength into the change handlers, where it applies to typing and nothing else. Parents keep receiving the plain number, so nothing downstream has to know about any of this. 87 tsc (unchanged baseline), 335/335.