Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
rzane committed Oct 1, 2020
1 parent 4fcfdd3 commit 80c16a7
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ const Input = ({
- [FormField](#formfield)
- [ValidateFn](#validatefn)
- [Submit](#submit)
- [Submission](#submission)
- [Reset](#reset)
- [UseFormOptions](#useformoptions)
- [UseValidationOptions](#usevalidationoptions)
Expand Down Expand Up @@ -372,6 +373,12 @@ Indicate that the form is validating

Type: SetState<[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)>

#### setSubmission

Update the form's submission status

Type: SetState<[Submission](#submission)>

#### reset

Reset the state of the form
Expand Down Expand Up @@ -430,6 +437,12 @@ Indicates that the form is currently being submitted

Type: [boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)

#### submission

Keeps track of the form's submission status

Type: [Submission](#submission)

#### setValue

Change the value. Just like with `setState`, you can pass a callback
Expand Down Expand Up @@ -467,6 +480,22 @@ Submits the form.

Type: function (event: FormEvent<[HTMLFormElement](https://developer.mozilla.org/docs/Web/API/HTMLFormElement)>): [Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<void>

### Submission

Keeps track of submissions.

#### count

The number of times the form has been submitted

Type: [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)

#### error

If the submission flow throws an error, it will appear here.

Type: [Error](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error)

### Reset

Resets the form.
Expand Down
1 change: 1 addition & 0 deletions documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ toc:
- FormField
- ValidateFn
- Submit
- Submission
- Reset
- UseFormOptions
- UseValidationOptions

0 comments on commit 80c16a7

Please sign in to comment.