Skip to content

NumberField: remove hardcoded minValue#773

Open
mkernohanbc wants to merge 1 commit into
mainfrom
bug/numberfield-minimum
Open

NumberField: remove hardcoded minValue#773
mkernohanbc wants to merge 1 commit into
mainfrom
bug/numberfield-minimum

Conversation

@mkernohanbc

Copy link
Copy Markdown
Contributor

This change corrects an error in how minValue is handled in NumberField, that surfaced during some testing work.

NumberField previously had its minValue hardcoded to 0 — which is the desired default behaviour, but would also potentially cause issues if someone wanted to set a different minValue.

This change destructures minValue in order to set the desired default, without hard-coding it.

@mkernohanbc mkernohanbc self-assigned this Jul 2, 2026
@mkernohanbc mkernohanbc requested a review from a team as a code owner July 2, 2026 20:19
@mkernohanbc mkernohanbc added the bug label Jul 2, 2026
@mkernohanbc mkernohanbc requested a review from ty2k July 2, 2026 20:19
@mkernohanbc mkernohanbc added this to the Components v0.9.0 milestone Jul 2, 2026
@ty2k ty2k requested a review from Copilot July 2, 2026 20:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates NumberField to apply a default minValue of 0 via parameter destructuring (instead of an inline JSX literal), ensuring the default is preserved even when callers pass minValue={undefined}.

Changes:

  • Destructure minValue with a default of 0 in the NumberField component signature.
  • Pass the destructured minValue through to ReactAriaNumberField instead of using minValue={0}.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mkernohanbc mkernohanbc added the react-components Changes or issues affecting the design-system-react-components package label Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug react-components Changes or issues affecting the design-system-react-components package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants