Skip to content
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

fix: Searchbar focus() #2519

Merged
merged 1 commit into from
Apr 9, 2021
Merged

fix: Searchbar focus() #2519

merged 1 commit into from
Apr 9, 2021

Conversation

wodCZ
Copy link
Contributor

@wodCZ wodCZ commented Jan 22, 2021

Closes #2393; Closes #2394

Summary

For some reason, returning the reference to underlying method raises dispatchCommand was called with a ref that isn't a native component error and doesn't actually focus the input.

Returning new proxy method works as expected (and allows us to remove @ts-ignore too).

Test plan

Not sure about testing, just wanted to get things moving.

@wodCZ wodCZ changed the title fix Searchbar focus() fix: Searchbar focus() Jan 22, 2021
@karimcambridge
Copy link

Can we fix this in the next version? It's been broken for a long time

@raajnadar
Copy link
Collaborator

@wodCZ can you fix the merge conflicts!

@wodCZ
Copy link
Contributor Author

wodCZ commented Mar 6, 2021

@raajnadar rebased, didn't have time to actually test the rebased version though.
The change remains the same - instead of forwarding the original handler, wrap it in a new callback.

@wodCZ
Copy link
Contributor Author

wodCZ commented Mar 9, 2021

Ok, I've just updated the app where we use this, and can confirm that the issues are still present in react-native-paper 4.7.2, and can confirm that this change fixes the behavior.

@raajnadar is there anything I can do to get things moving?

@raajnadar raajnadar requested a review from Trancever March 9, 2021 17:46
@lukewalczak lukewalczak merged commit 66d93b3 into callstack:main Apr 9, 2021
@wodCZ wodCZ deleted the patch-1 branch April 9, 2021 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants