react-redux-form
react-redux-form copied to clipboard
Is there a way to listen to model changes on particular controls
Is there a way to listen to model changes directly on a control, instead of the whole form? It would be useful to know when a particular input changes.
I tried:
<Control.text model=".text" onChange={(e, field) => console.log(e, field)} updateOn="blur" />
but I don't think it was designed for it, since the callback function is called on every keystroke, not just on blur.
Thank you!
Is that not giving the expected result? Are you looking to listen for model changes only on blur?
Yes, exactly. I would love to know every time the model changes for the component with model=".text", and have a handler attached to it.