@@ -12,10 +12,11 @@ export function Form({
12
12
initialValues,
13
13
onCancel,
14
14
onSubmit,
15
+ onChange,
15
16
submitLabel,
16
17
validations,
17
18
} ) {
18
- const formState = useForm ( initialValues , validations ) ;
19
+ const formState = useForm ( initialValues , validations , onChange ) ;
19
20
const formRef = useRef ( null ) ;
20
21
21
22
function resetForm ( ) {
@@ -72,12 +73,13 @@ Form.defaultProps = {
72
73
73
74
Form . propTypes = {
74
75
cancelLabel : PropTypes . string ,
75
- children : PropTypes . oneOfType ( [ PropTypes . element , PropTypes . arrayOf ( PropTypes . element ) ] ) ,
76
+ children : PropTypes . oneOfType ( [ PropTypes . node , PropTypes . arrayOf ( PropTypes . node ) ] ) ,
76
77
customValidation : PropTypes . bool ,
77
- customActions : PropTypes . oneOfType ( [ PropTypes . element , PropTypes . arrayOf ( PropTypes . element ) ] ) ,
78
+ customActions : PropTypes . oneOfType ( [ PropTypes . node , PropTypes . arrayOf ( PropTypes . node ) ] ) ,
78
79
initialValues : PropTypes . object ,
79
80
onCancel : PropTypes . func ,
80
81
onSubmit : PropTypes . func . isRequired ,
82
+ onChange : PropTypes . func ,
81
83
submitLabel : PropTypes . string ,
82
84
validations : PropTypes . object ,
83
85
} ;
0 commit comments