Skip to content

Fix/text field flex #2345

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

Merged
merged 2 commits into from
Dec 5, 2022
Merged

Fix/text field flex #2345

merged 2 commits into from
Dec 5, 2022

Conversation

adids1221
Copy link
Contributor

@adids1221 adids1221 commented Nov 24, 2022

Description

Fix TextFiled Incubator issues while using trailingAccessory.
TextFiled Incubator now has a new prop centered to center the label and the container.
Issues solved:

  1. text filed push trailingAccessory and overflow the screen
  2. new centered prop to center the label and the container, text doesn't overflow from the screen while centered.

Changelog

Fix TextFiled Incubator issues while using trailingAccessory.

labelStyle={{alignSelf: 'center'}}
containerStyle={{alignSelf: 'center'}}
/>
<TextField label="PIN" placeholder="XXXX" centered/>
Copy link
Collaborator

Choose a reason for hiding this comment

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

If you add trailingAccessory in this example and enter a long long value, the icon will exit the screen.

Copy link
Contributor Author

@adids1221 adids1221 Dec 5, 2022

Choose a reason for hiding this comment

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

I notice this and I spoke with Ethan about this before I made this PR.
Ethan told me that 'centered' is for certain cases and for short text (mainly), so the example with the trailingAccessory and long value is an 'edge case'.
If we will have an issue with that particular case in the future we will handle it.
@ethanshar
Ethan, I tagged you to confirm that.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, agree. Let's handle it when the issue rise. For now I think it's important to fix the common issue this PR fixes.

@adids1221 adids1221 requested a review from Inbal-Tish December 5, 2022 06:38
@Inbal-Tish Inbal-Tish merged commit f18d3a4 into master Dec 5, 2022
@M-i-k-e-l M-i-k-e-l mentioned this pull request Dec 5, 2022
@adids1221 adids1221 deleted the fix/TextField_flex branch December 13, 2022 12:11
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.

3 participants