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(TextArea): Error state not correctly set when maxlength is exceeded #2588

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

Conversation

feclist
Copy link
Contributor

@feclist feclist commented Nov 15, 2024

Follow up on #2574

Somewhere in the process of implementing the above PR the error state wasn't triggering anymore once the max length was exceeded (when it is allowed to do so).

Before:
image

After:
image

This PR fixes the conditional logic and uses the characterCount state variable to more reliably check against the maxLength prop.

@feclist feclist requested a review from a team as a code owner November 15, 2024 15:34
Copy link
Member

@talkor talkor left a comment

Choose a reason for hiding this comment

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

Let's add a test for that please, to prevent future breaking of this feature

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