You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm curious about the possibility of having the active prop cause the underlying material-ui component to gain focus. It seems that, when a component gains focus, it calls an onFocus callback that's been handed to it by redux-form. This callback fires a FOCUS action, which results in a state mutation and the active flag being set on the ui component. Could the setting of the active field state, via the reducer plugin, do the reverse and cause the field's focus() method to be called? Right now, messing with the state directly does cause the active prop to be properly set on the ui component. But the component does not translate that into a call to its focus() method, afaik. These wrappers could see the change to the active prop and pass that down to the material ui component via a ref call. mui/material-ui#1594 demonstrates how to set focus on a mui field programmatically.
The text was updated successfully, but these errors were encountered:
I tried this, and it doesn't work. I'm calling this.refs.component.focus() whenever the props.meta.active changes from false to true, and it doesn't actually do anything. Bummer... 😢
I'm curious about the possibility of having the
active
prop cause the underlying material-ui component to gain focus. It seems that, when a component gains focus, it calls anonFocus
callback that's been handed to it by redux-form. This callback fires aFOCUS
action, which results in a state mutation and theactive
flag being set on the ui component. Could the setting of the active field state, via the reducer plugin, do the reverse and cause the field'sfocus()
method to be called? Right now, messing with the state directly does cause theactive
prop to be properly set on the ui component. But the component does not translate that into a call to itsfocus()
method, afaik. These wrappers could see the change to theactive
prop and pass that down to the material ui component via a ref call. mui/material-ui#1594 demonstrates how to set focus on a mui field programmatically.The text was updated successfully, but these errors were encountered: