Skip to content

TextField - new features: helperText and validationIcon #3097

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 5 commits into from
May 28, 2024

Conversation

Inbal-Tish
Copy link
Collaborator

Description

TextField - new features: helperText and validationIcon

Changelog

TextField - new features: helperText and validationIcon

Additional info

ticket 4173

@Inbal-Tish Inbal-Tish requested a review from ethanshar May 27, 2024 12:45
@Inbal-Tish Inbal-Tish added this to the Form milestone May 27, 2024
@@ -74,7 +76,7 @@ const TextField = (props: InternalTextFieldProps) => {
enableErrors, // TODO: rename to enableValidation
validationMessageStyle,
validationMessagePosition = ValidationMessagePosition.BOTTOM,
retainValidationSpace = true,
retainValidationSpace = !helperText,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just to make sure I understand
because helperText now renders under the input then we don't need to retain space if it exists?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes. Otherwise there will be a gap btw the input and the helperText

@Inbal-Tish Inbal-Tish requested a review from ethanshar May 28, 2024 07:27
Copy link
Collaborator

@ethanshar ethanshar left a comment

Choose a reason for hiding this comment

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

Approved. But see my comment about the fix in the example screen
Anyway the build fails

validationMessage="This field is required"
containerStyle={{flexGrow: 1}}
validationMessage="This field is required. That means you have to enter some value"
containerStyle={{width: 300}}
Copy link
Collaborator

Choose a reason for hiding this comment

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

It's not a good fix, we can't expect the user to do this, so we need to understand better the issue maybe it'll lead us to a problem in the TextField implmentation
We can do it separately since it's not related to the PR as you said

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

@Inbal-Tish Inbal-Tish enabled auto-merge (squash) May 28, 2024 09:12
@Inbal-Tish Inbal-Tish merged commit f2151e1 into master May 28, 2024
1 check passed
@Inbal-Tish Inbal-Tish deleted the feat/TextField_helperText branch May 28, 2024 09:26
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