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(numberinput): use native methods for stepping the value up/down #14463

Merged

Conversation

tay1orjones
Copy link
Member

@tay1orjones tay1orjones commented Aug 18, 2023

Closes #6684
Closes #12897

Changelog

Changed

  • Use native stepUp() and stepDown() methods to step the value up and down

Testing / Reviewing

  • Go to the NumberInput playground story, and enter a step of 0.01
  • Increment the value with the + stepper many times
  • Validate that the input only displays even values incrementing by 0.01
  • We should no longer see the invalid behavior of the input getting values with rounding errors of multiple decimal places, like 50.999999998

@tay1orjones tay1orjones requested a review from a team as a code owner August 18, 2023 17:52
Copy link
Member

@alisonjoseph alisonjoseph left a comment

Choose a reason for hiding this comment

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

🙌 nice!

@netlify
Copy link

netlify bot commented Aug 18, 2023

Deploy Preview for carbon-components-react ready!

Name Link
🔨 Latest commit d8a0bf7
🔍 Latest deploy log https://app.netlify.com/sites/carbon-components-react/deploys/64e61f0730a4290008f0c2e8
😎 Deploy Preview https://deploy-preview-14463--carbon-components-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Aug 18, 2023

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit d8a0bf7
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/64e61f086bf4e80008570ef9
😎 Deploy Preview https://deploy-preview-14463--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@guidari guidari left a comment

Choose a reason for hiding this comment

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

LGTM!! 🚀

Looks like we just need to remove the LegacyRef prop, so the lint is good to go!

@tw15egan
Copy link
Collaborator

@tay1orjones this is awesome 🙌🏻

@tw15egan
Copy link
Collaborator

This will also close #12897

@tw15egan tw15egan added this pull request to the merge queue Aug 23, 2023
Merged via the queue into carbon-design-system:main with commit c678397 Aug 23, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants