Replies: 3 comments 1 reply
-
Hello. To refresh
Hence, as you provide the new I created the example of currency input field using numeral.js here. I hope it helps your work. 😄 |
Beta Was this translation helpful? Give feedback.
-
@sujinleeme Well, i have addition. The way i did this is bad because it resets the carret position, since This is not about making all caps but the same logic(get input value, transform it, write it with UPD: According to @sujinleeme sandbox, controller also seems to natively working bad with this scenario. But probably you can first update inputs value synchronously to prevent carret jumping |
Beta Was this translation helpful? Give feedback.
-
Well, solved number formatting issue with a more complex approach with react-number-format |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, i need input which takes user input and transform it to caps(both as displayed value and saved value).
User input
Usd
, the input shows:USD
I have read this https://react-hook-form.com/advanced-usage#TransformandParse but it doesn't provide example with
register
.What I noticed:
controller
'sfield.onChange
is completely different fromregister
'sonChange
, so I cant reuse the provided example for my implementation.Working solution i came up so far:
But is this the way it is supposed to be done? Is there better way?
Beta Was this translation helpful? Give feedback.
All reactions