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

TextField label issues with enableErrors #2866

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ethanshar
Copy link
Collaborator

Description

Avoid hiding TextField label when field is invalid but enableErrors is false

Changelog

Fix issue with TextField's Label become hidden while field is invalid and enableErrors is false

Additional info

@nitzanyiz
Copy link
Contributor

nitzanyiz commented Jan 2, 2024

That works. When the field is not valid the label still becomes red. Is that what we want? I feel like it should not show any indication about the errors.
Using this:
<TextField label="Required" validate={'required'} showMandatoryIndication validationMessage={'required'} enableErrors={false} validateOnChange validationMessagePosition={TextField.validationMessagePositions.TOP}/>
Simulator Screen Recording - iPhone 14 Pro Max - 2024-01-02 at 10 01 22

@nitzanyiz nitzanyiz self-assigned this Jan 2, 2024
@ethanshar
Copy link
Collaborator Author

Let's also confirm this behavior with Diana tomorrow

@ethanshar
Copy link
Collaborator Author

@nitzanwix take a look again, I made some fixes

@nitzanyiz
Copy link
Contributor

nitzanyiz commented Jan 14, 2024

@nitzanyiz
Copy link
Contributor

Snippet to reproduce

<TextField
  validate={'required'}
  label="Required"
  showMandatoryIndication
  validateOnChange
  validationMessagePosition="top"
  validationMessage={'this is required'}
  enableErrors={false}
/>

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.

None yet

2 participants