Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
kubk committed Apr 25, 2024
1 parent 3fde1d4 commit 4a7f9cb
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 17 deletions.
15 changes: 9 additions & 6 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,25 @@ export default defineConfig({

lastUpdated: true,
sitemap: {
hostname: 'https://kubk.github.io/mobx-form-lite/',
hostname: "https://kubk.github.io/mobx-form-lite/",
},

head: [
[
'script',
{ async: '', src: 'https://www.googletagmanager.com/gtag/js?id=G-FFVNRL9XPJ' }
"script",
{
async: "",
src: "https://www.googletagmanager.com/gtag/js?id=G-FFVNRL9XPJ",
},
],
[
'script',
"script",
{},
`window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-FFVNRL9XPJ');`
]
gtag('config', 'G-FFVNRL9XPJ');`,
],
],

themeConfig: {
Expand Down
22 changes: 11 additions & 11 deletions docs/api-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

Field functions are used to manipulate the form as a whole. They are used to check the form state, reset it, and more.

| **Function** | **Description** |
|--------------------------|------------------------------------------------------------------------------------------------------------------------------------|
| isFormValid | Check if the form is valid |
| formReset | Reset all fields to their initial values |
| isFormEmpty | Check if the form is empty |
| isFormDirty | Check if form has any changed field |
| isFormTouched | Check if the form is touched. A touched field is a field that has been focused and then blurred |
| formTouchAll | Set all fields as touched recursively |
| formUnTouchAll | Set all fields as untouched recursively |
| isFormTouchedAndValid | Check if the form is touched and valid |
| isFormTouchedAndHasError | Check if form has any touched field with error |
| **Function** | **Description** |
| ------------------------ | ----------------------------------------------------------------------------------------------- |
| isFormValid | Check if the form is valid |
| formReset | Reset all fields to their initial values |
| isFormEmpty | Check if the form is empty |
| isFormDirty | Check if form has any changed field |
| isFormTouched | Check if the form is touched. A touched field is a field that has been focused and then blurred |
| formTouchAll | Set all fields as touched recursively |
| formUnTouchAll | Set all fields as untouched recursively |
| isFormTouchedAndValid | Check if the form is touched and valid |
| isFormTouchedAndHasError | Check if form has any touched field with error |

0 comments on commit 4a7f9cb

Please sign in to comment.