-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
feat(textarea): added char counter #10442
feat(textarea): added char counter #10442
Conversation
this includes ui changes, test, and styles
✔️ Deploy Preview for carbon-react-next ready! 🔨 Explore the source changes: dbe11e4 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-react-next/deploys/6201646d3fa84f00085e6ab3 😎 Browse the preview: https://deploy-preview-10442--carbon-react-next.netlify.app |
@abbeyhrt fyi |
✔️ Deploy Preview for carbon-elements ready! 🔨 Explore the source changes: dbe11e4 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-elements/deploys/6201646df159090008365293 😎 Browse the preview: https://deploy-preview-10442--carbon-elements.netlify.app |
✔️ Deploy Preview for carbon-components-react ready! 🔨 Explore the source changes: dbe11e4 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-components-react/deploys/6201646d2e28bb00072ee931 😎 Browse the preview: https://deploy-preview-10442--carbon-components-react.netlify.app |
@tw15egan updated |
@TannerS can you try running |
@tw15egan thanks! ya that updated a file. I am a big confused, what does that command do? it seemed to update by adding the prop which is part of an active PR so I am a bit confused on what that commands does and why did it add that prop that was added to a PR not yet merged? |
|
@tw15egan I thought maybe I messed up a merge or something but it added that prop without the eslint comment like in the PR above, so I am not sure... either way, it may been what I needed to fix it, so thank you! |
ok, maybe i just messed up and the merge i did left out a file, either way, it should be fixed, so thanks! |
@TannerS This looks great so far! One thing I noticed, messing around with the story, is that you can set a maxCount when enableCounter is false and it does prevent the user from typing passed that maxCount. Is that intended? It seems a bit weird to have a limit that isn't communicated to the user but there definitely could be a use case you have in mind that I don't :) |
Visually it looks good to me. Thank you! 👍. But I also have the same question as Abbey above^ |
Hey guys that might be a bug let me test it out in just a bit here thank
you for pointing that out
…On Thu, Feb 3, 2022, 12:00 PM Lauren Rice ***@***.***> wrote:
Visually it looks good to me. Thank you! 👍. But I also have the same
question as Abbey above^
—
Reply to this email directly, view it on GitHub
<#10442 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACDUUD6NJV7DNGRWGDTVR7TUZK7FTANCNFSM5L47XOMA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@abbeyhrt @laurenmrice hey guys, ya it was a bug, I pushed a fix, let me know if the way I fixed it is acceptable / carbon standards ! |
if (enableCounter) { | ||
textareaProps.maxLength = maxCount; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 🎉 Looks great to me! Thank you for the contribution 😃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thank you for contributing this! ✅ ⭐️
Closes #
#1672
#5702
Changelog
New
Adds two new props to enable a textarea counter, and an actually max counter limit. Added some styles too.
Testing / Reviewing
Added functionality to test live changes in storybook and added unit test. I am all for people helping me look over my unit test for feedback
{{ Add descriptions, steps or a checklist for how reviewers can verify this PR works or not }}
Added
Behavior
Test