Skip to content

CAutocomplete doesn't call onChange on blur #566

@sebcode

Description

@sebcode

See https://codesandbox.io/p/sandbox/5x5z3s

The current implementation of onChange is too restrictive, only triggering when a user selects a predefined list item or confirms custom input by pressing Return.

This creates a user experience issue: if a user types a custom value and then moves focus to another form field (blurs), the value is visually retained in the input, but the underlying state is not updated because onChange was never called.

To resolve this state-UI discrepancy, onChange should also be called on the blur event.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions