Skip to content

Comments

feat: add isValueSnappingDisabled to NumberField#9679

Draft
will-stone wants to merge 1 commit intoadobe:mainfrom
will-stone:add-value-snapping-disabled-to-number-field
Draft

feat: add isValueSnappingDisabled to NumberField#9679
will-stone wants to merge 1 commit intoadobe:mainfrom
will-stone:add-value-snapping-disabled-to-number-field

Conversation

@will-stone
Copy link

@will-stone will-stone commented Feb 18, 2026

As discussed here: #8776

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

  1. Open the Step3WithMin2Max21ValueSnappingDisabled story.
  2. Enter a value that's either under min, over max, or a wrong step.
  3. Blur the input.
  4. Notice the onChange callback fires with the same value you entered, and the input does not auto-snap to a valid number.

🧢 Your Project:

This will be used in an e-commerce situation where the NumberField is used for product quantity. Snapping is dangerous, for us, because a customer may not know that the number has been auto-healed, causing them to order less or more of what they need. I work for RS Group, and RAC powers our component library: ion. The component in question isn't live yet, but the RAC implementation is to replace our QuantityStepper component.

@will-stone
Copy link
Author

Happy to have a stab at the docs but I'd like to please know if this is something you'd consider adding first 🙏 😅

@LFDanLu
Copy link
Member

LFDanLu commented Feb 20, 2026

@will-stone interesting, this went a bit of a different route than I was expecting but I suppose native number type input fields do behave the same way. @snowystinger Any opinions here? Do you remember any reasons we didn't go this route in the first place?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants