Skip to content

Conversation

@shoqcia
Copy link

@shoqcia shoqcia commented Nov 19, 2025

Closes #20987

This update refines the NumberInput blur behavior by returning a parsed numeric value from the onBlur handler and introducing a new onStepperBlur prop to clearly separate blur events from the input and the stepper controls. The returned value is now a plain number, ensuring correct handling of decimal inputs when using the "text" type.

Changelog

New

  • Added onStepperBlur prop to handle blur events from the stepper separately.

Changed

  • onBlur now returns the parsed numeric value.
  • onBlur is applied only to the input element.

Testing / Reviewing

Provide an onBlur callback to the NumberInput component and verify that it receives the parsed numeric value on blur.

PR Checklist

As the author of this PR, before marking ready for review, confirm you:

  • Reviewed every line of the diff
  • Updated documentation and storybook examples
  • Wrote passing tests that cover this change
  • Addressed any impact on accessibility (a11y)
  • Tested for cross-browser consistency
  • Validated that this code is ready for review and status checks should pass

More details can be found in the pull request guide

@netlify
Copy link

netlify bot commented Nov 19, 2025

Deploy Preview for v11-carbon-web-components ready!

Name Link
🔨 Latest commit 097230f
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-web-components/deploys/69297c9806dbc10008163bdb
😎 Deploy Preview https://deploy-preview-21052--v11-carbon-web-components.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 project configuration.

@netlify
Copy link

netlify bot commented Nov 19, 2025

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 097230f
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-react/deploys/69297c9885bf0100089d0baf
😎 Deploy Preview https://deploy-preview-21052--v11-carbon-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 project configuration.

@netlify
Copy link

netlify bot commented Nov 19, 2025

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 097230f
🔍 Latest deploy log https://app.netlify.com/projects/carbon-elements/deploys/69297c987c0096000803d0f3
😎 Deploy Preview https://deploy-preview-21052--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 project configuration.

@shoqcia shoqcia marked this pull request as ready for review November 19, 2025 15:01
@shoqcia shoqcia requested a review from a team as a code owner November 19, 2025 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: NumberInput with type 'text' ignores the value set in onChange

1 participant