New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
detecting focus on any field ? #1777
Comments
Each |
Yes, but it would be nice if it was in the passed down props. Because if I On Sep 15, 2016 7:51 AM, "Erik Rasmussen" notifications@github.com wrote:
|
+1 I am looking to implement a checkout payment credit card form with a visual credit card reference (using https://github.com/JohnyDays/react-credit-card) and I need to tell the Card component which field currently holds focus (so that the visual reference can spin around to display the CVC when the user is inputting that information). Ideally the form's would receive a prop containing the entire 'state' (values, meta, errors etc) of its Fields and the user could destructure the state accordingly. Currently I'm planning to use the parse/normalize hooks and store the focus state myself. |
Not passing all the values/meta/errors as props as a default behaviour is, to my understanding, an intentional part of the api that helps keep it performant by default. Otherwise you drift towards the v5 api which was revamped partly because of this problem. Closing this usage question as it is nine months old since last update. There are now many ways provided to access the state information required, namely the provided selectors. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
this might be very obvious but how can i detect that field has focus , because on mobile the keyboard moves up and i need to adjust the UI accordingly.
The text was updated successfully, but these errors were encountered: