-
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): restore defaultValue
prop functionality in uncontrolled number input
#7312
fix(NumberInput): restore defaultValue
prop functionality in uncontrolled number input
#7312
Conversation
315c2bb
to
6797fff
Compare
Deploy preview for carbon-elements ready! Built with commit 315c2bb |
Deploy preview for carbon-components-react ready! Built with commit 315c2bb https://deploy-preview-7312--carbon-components-react.netlify.app |
Deploy preview for carbon-elements ready! Built with commit 16ae7c4 |
Deploy preview for carbon-components-react ready! Built without sensitive environment variables with commit 16ae7c4 https://deploy-preview-7312--carbon-components-react.netlify.app |
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 good! @emyarod
Closes #7299
This PR restores functionality to the
defaultValue
prop in uncontrolled number inputs and removes the React warning about setting bothdefaultValue
andvalue
on the inputChangelog
New
defaultValue
testChanged
defaultValue
into inputdefaultValue
typecheckgDSFP
Testing / Reviewing
Confirm that setting a
defaultValue
on an uncontrolled number input works as expected and the correct value is displayed on render