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: use transformOrigin to fix TextInput label position flickering in RN 0.73 #4521

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

BuqiLiao
Copy link

@BuqiLiao BuqiLiao commented Oct 8, 2024

Motivation

This pull request aims to resolve the TextInput flickering issue caused by the use of translateX to adjust the label position. The recent addition of transformOrigin in React Native 0.73 allows us to set the transform origin directly to the left, removing the need for translateX adjustments and preventing flickering.

Related issue

#4341
#4245
#4299
#4340

Test plan

  1. Run the application on React Native 0.73 or later.
  2. Test TextInput components with floating labels in with mode "outlined"
  3. Verify that the label no longer flickers or jumps during state changes.

@callstack-bot
Copy link

Hey @BuqiLiao, thank you for your pull request 🤗. The documentation from this branch can be viewed here.

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.

2 participants