unicef / material-ui-currency-textfield

Currency textfield for React Material UI
https://unicef.github.io/material-ui-currency-textfield/
116 stars 94 forks source link

Support `input` event in addition to `change` event #58

Open cyberixae opened 2 years ago

cyberixae commented 2 years ago

The onChange callback used by the currency text field is a bit problematic because of the vague guarantees it provides of being called. I'm experiencing a problem with Chrome on Android where the the callback is ~always called with outdated data because according to specification the event doesn't need to fire every time something changes. It would be nice if CurrencyTextField would also support the onInput callback that is guaranteed to be called every time the user modifies the value.