Previously I was masking phone inputs (to turn 1112345678 into (111) 234-5678 in the form ui) with a function that ran when the form value was set
value={formatPhone(model.foo.phone) }
This no longer works in the latest version of rrf (0.12.6). Is there a recommended way to handle such a task?
Sure, try this:
<Field model="model.foo.phone"
parser={formatPhone}>
<input type="text" />
</Field>
Check out this page for more info (warning: old docs but the code should still work with the _latest_ version of RRF): http://davidkpiano.github.io/react-redux-form/docs/index.html#/recipe/parse-fields
Sorry to resurrect this but curious if there is any new docs on doing masks. The old ones are gone from the internet.
Most helpful comment
nvm https://davidkpiano.github.io/react-redux-form/docs/api/Control.html#prop-parser