Skip to content

Commit c323b32

Browse files
committed
handle onChange without event
Change "OnChange" to match RenderFieldProps definition
1 parent 1257461 commit c323b32

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/useField.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ const useField = (name, form, subscription) => {
1919
name,
2020
value: value || '',
2121
onBlur: () => state.blur(),
22-
onChange: event => state.change(event.target.value),
22+
onChange: event =>
23+
state.change(event.target ? event.target.value : event),
2324
onFocus: () => state.focus()
2425
},
2526
meta

0 commit comments

Comments
 (0)