-
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
fix(NumberInput): allow value to be outside min/max, show validation #9121
fix(NumberInput): allow value to be outside min/max, show validation #9121
Conversation
dd29392
to
bcc7f84
Compare
❌ Deploy Preview for carbon-react-next failed. 🔨 Explore the source changes: 20ae401 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-react-next/deploys/60e5b42d04212e0008a66274 |
✔️ Deploy Preview for carbon-elements ready! 🔨 Explore the source changes: 20ae401 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-elements/deploys/60e5b42d2bfca20007e58dba 😎 Browse the preview: https://deploy-preview-9121--carbon-elements.netlify.app |
✔️ Deploy Preview for carbon-components-react ready! 🔨 Explore the source changes: 20ae401 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-components-react/deploys/60e5b42df55aec0007b8c940 😎 Browse the preview: https://deploy-preview-9121--carbon-components-react.netlify.app |
6d8ade2
to
07202c0
Compare
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.
LGTM! 🔥
Closes #8965
Allows a
value
prop to be passed in that is larger than themin
andmax
bounds, instead of capping at themin
ormax
. If a value is passed in that exceeds these limits, the validation is shown. If the number steppers are used when an invalid number is shown, it will skip the closest valid number.Changelog
Removed
value
is passed directly toNumberInput
Testing / Reviewing
In the playground, set the
value
knob to a number outside the min/max value. The validation should be shown, and the stepper should prevent an invalid increment/decrement.