Skip to content

[number field] onValueChange not triggered on input blur (focusout) since v1.0.0-beta.1 #2735

@log7422

Description

@log7422

Bug report

Current behavior

After upgrading from

"@base-ui-components/react": "1.0.0-beta.2"

to

"@base-ui-components/react": "1.0.0-beta.3"

the onValueChange callback signature has changed:


// before
event?: Event

// now
eventDetails: NumberField.Root.ChangeEventDetails

This change itself is fine, however I lost access to the focusout event.

When I increment/decrement the value via the NumberField controls, the onValueChange callback is triggered as expected.

But when I type a value directly into the input and then blur/lose focus (focusout), the onValueChange callback is not triggered anymore.

This breaks the previous behavior where changes were detected after editing the input manually and leaving the field.

Expected behavior

The onValueChange callback should also be triggered when the user enters a value manually and then blurs the input (focusout), not only when incrementing/decrementing.

Reproducible example

A minimal reproduction showing the difference between 1.0.0-beta.2 and 1.0.0-beta.3:
[CodeSandbox/StackBlitz link here if available]

Base UI version

@base-ui-components/react: 1.0.0-beta.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions