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
TextInput onFocus Type is not LayoutEvent #3968
Comments
@Simek Are you familiar with this? It looks like you've been involved in the changes to this section from the history. I'm trying to leverage the onFocus callback to scroll my wrapping Thanks for any help you can provide. Much appreciated!! |
👋 Hey there, it looks like there has been no activity on this issue in the last 90 days. Has the issue been fixed, or does it still require the community attention? This issue will be closed in the next 7 days if no further activity occurs. Thank you for your contributions. |
Is there anyone that can help answer this? I have a workaround, but I think it would be helpful if the documentation was updated or a further explanation was added. |
Description
According to the documentation under TextInput, the onFocus prop is supposed to accept a function that handles a
LayoutEvent
. However, when trying to implement the onFocus prop, it looks like it actually accepts a function that handles theNativeSyntheticEvent<TextInputFocusEventData>
. This type varies significantly from the LayoutEvent type and does not include attributes such as x, y, height, width.It would help if the documentation can explain how to extract a LayoutEvent from this other type or change the type signature to reflect the difference.
Documentation version
0.73 - https://reactnative.dev/docs/textinput#onfocus
The text was updated successfully, but these errors were encountered: