fix(numberinput): update onChange value type to Number for type="text"#19742
Merged
kennylam merged 5 commits intoJun 26, 2025
Merged
Conversation
✅ Deploy Preview for v11-carbon-web-components ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for v11-carbon-react ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for v11-carbon-web-components ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for v11-carbon-react ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #19742 +/- ##
==========================================
+ Coverage 84.73% 84.78% +0.05%
==========================================
Files 369 369
Lines 14678 14700 +22
Branches 4838 4852 +14
==========================================
+ Hits 12437 12464 +27
+ Misses 2092 2087 -5
Partials 149 149 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
maradwan26
approved these changes
Jun 25, 2025
maradwan26
left a comment
Contributor
There was a problem hiding this comment.
Works as intended, LGTM !
kennylam
approved these changes
Jun 26, 2025
Merged
via the queue into
carbon-design-system:main
with commit Jun 26, 2025
67aed3f
40 of 41 checks passed
1 task
heloiselui
pushed a commit
to guidari/carbon
that referenced
this pull request
Jul 11, 2025
carbon-design-system#19742) * fix(numberinput): update onChange value type to Number, ensure onBlur is called for steppers * fix(numberinput): ensure event loop is properly updated for type=text * docs(numberinput): new stepper logic --------- Co-authored-by: kennylam <909118+kennylam@users.noreply.github.com>
2 tasks
Merged
5 tasks
AlexanderMelox
pushed a commit
to AlexanderMelox/carbon
that referenced
this pull request
Apr 28, 2026
carbon-design-system#19742) * fix(numberinput): update onChange value type to Number, ensure onBlur is called for steppers * fix(numberinput): ensure event loop is properly updated for type=text * docs(numberinput): new stepper logic --------- Co-authored-by: kennylam <909118+kennylam@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #19630
Based on user feedback, this updates the
NumberInputAPI and logic whentype="text"in the following ways:Changelog
New
onBlurto NumberInput APIChanged
defaultValueto default to0for type="number" andNaNfor type="text"NaNvaluesonChangeto be aNumber, not the locale-formattedstringonBluris called when the input is blurred, and also when stepper buttons are blurredTesting / Reviewing
valueoverdefaultValueWarning
"Controlled" story and associated story helper/logging functions need to be removed before merge
PR Checklist
As the author of this PR, before marking ready for review, confirm you:
More details can be found in the pull request guide