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

Auto focus only on mount #362

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

bernhardoj
Copy link
Contributor

Details

Removed autoFocus from the useEffect deps so it only auto focus on mount.

Related Issues

Expensify/App#42645

Manual Tests

  1. Add an autoFocus state to the example app
  2. Add a new button to toggle the state
  3. Press the button to toggle the state
  4. If the state is true, verify the input isn't focused

Before:

Screen.Recording.2024-06-01.at.10.03.27.mov

After:

Screen.Recording.2024-06-01.at.10.03.48.mov

@bernhardoj bernhardoj changed the title auto focus only on mount Auto focus only on mount Jun 1, 2024
@tomekzaw
Copy link
Collaborator

tomekzaw commented Jun 1, 2024

@bernhardoj Thanks for the PR!

LGTM but let's wait for @Skalakid's or @BartoszGrajdek's approval prior to merging.

Copy link
Collaborator

@BartoszGrajdek BartoszGrajdek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, approved! ✅

Copy link
Collaborator

@Skalakid Skalakid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tomekzaw tomekzaw merged commit 1f927a0 into Expensify:main Jun 3, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants