-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: adds missing docs for initial state and adds roadmap section
- Loading branch information
Showing
1 changed file
with
17 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,8 @@ This project aims to seamlessly integrate Inertia.js with FormKit forms, leverag | |
2. [States](#states) | ||
3. [Event Functions](#event-functions) | ||
3. [Event System](#event-system) | ||
4. [Types](#types) | ||
4. [Roadmap](#roadmap) | ||
5. [Types](#types) | ||
|
||
## Quick Start | ||
|
||
|
@@ -60,6 +61,14 @@ And that is it, now you're ready to look more into the available features of thi | |
|
||
To make integration between FormKit and Inertia easier we include a form helper composable designed to reduce the boilerplate needed for handling form submissions, it by default creates the event system, add method calls and reactive states, and it will also add default behaviours to FormKit forms like loading, disabling and setting errors that come from your backend. | ||
|
||
The `useForm()` accepts a single optional parameter that is the initial fields of your form: | ||
|
||
```ts | ||
const form = useForm({ | ||
email: '[email protected]', | ||
}) | ||
``` | ||
|
||
> Remember that for everything to work as expected you should add the returned plugin to FormKit: `:plugins="[form.plugin]"`. | ||
### Method Calls | ||
|
@@ -284,6 +293,13 @@ router.post('/login', options) | |
|
||
<p align="right">(<a href="#readme-top">back to top</a>)</p> | ||
|
||
## Roadmap | ||
|
||
- [] Make the `success` and `error` events to be able to return a `Promise<void>` to delay the call to the `finish` event | ||
- [] Add support for [Laravel Precognition](https://laravel.com/docs/10.x/precognition) | ||
|
||
<p align="right">(<a href="#readme-top">back to top</a>)</p> | ||
|
||
## Types | ||
|
||
<details> | ||
|