Skip to content
This repository was archived by the owner on Aug 23, 2022. It is now read-only.

Commit f72b62d

Browse files
committed
Updating docs for new form properties
1 parent 35dda15 commit f72b62d

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/api/Form.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,3 +149,18 @@ _(Any)_ The `component` that the `<Form>` should be rendered to (default: `"form
149149
- In HTML, you are not allowed to nest forms. If you do want to nest forms, you will have to do one of the following:
150150
- If you want a nested form that doesn't submit, you can set the nested form's component to something other than `'form'`, like `<Form component="div" ...>`
151151
- If you _do_ want a "form" inside a form that does submit, you'll have to set the component and submit manually by dispatching `actions.validSubmit(model, promise)`.
152+
153+
154+
## `onUpdate={(formValue) => ...}`
155+
_(Function)_ The handler function that is called with the form state whenever the form state is updated.
156+
157+
### Notes
158+
- This is an optional but useful property, especially if you are using [local forms](TODO).
159+
- Remember: the _form state_ is the state related to the form and its fields, such as whether it's valid, focused, pristine, etc.
160+
161+
## `onChange={(modelValue) => ...}`
162+
_(Function)_ The handler function that is called with the form's model value whenever the model value is updated.
163+
164+
### Notes
165+
- This is also an optional but useful property, especially if you are using [local forms](TODO).
166+
- Remember: the _model value_ is the value of the form's model, specified by the `model="..."` prop. The entire model value will be passed in.

0 commit comments

Comments
 (0)