Skip to content

Make onChange event handler accept standard event object as argument #1860

@smashercosmo

Description

@smashercosmo

🙋 Feature Request

Currently there is inconsistency in how react-area handles events. Almost all of the event handlers accept standard event object as argument. Except for onChange handler, which only accepts 'value'.

🤔 Expected Behavior

onChange handler should accept standard event object as argument

😯 Current Behavior

onChange handler only accepts value as argument

💁 Possible Solution

Introduce onValueChange event which will pass value to the event handler and change onChange event to pass event object to the event handler (in equivalent to onFocus and onFocusChange events)

🔦 Context

This inconsistency makes it hard to integrate with third-party libraries (like react-hook-form) which pass standard onChange handler to the component.

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