Skip to content

[BUG] #93

@hexcowboy

Description

@hexcowboy

The react-hook-form example is no longer valid as the types of onChange differ.

onChange in the input component uses (newValue: string) => void

const onChange = React.useCallback(
(newValue: string) => {
uncheckedOnChange?.(newValue)
setInternalValue(newValue)
},
[uncheckedOnChange],
)

onChange form react-hook-form expects (event: Event) => void

Image

Version of the library: 1.4.2

Expected Behavior

Either the example needs to be updated to only show use with <Controller> or onChange should conform to react-hook-forms definition.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions