Skip to content

Commit

Permalink
docs: fix doc issues and header consistency (#848)
Browse files Browse the repository at this point in the history
* fix `field.state` code example

* update h1 headers to h2

* docs: removed h1 header for linked fields, added id and title for linked fields
  • Loading branch information
TropicolX committed Jul 30, 2024
1 parent e1c5bee commit b7ef0e9
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/framework/angular/guides/arrays.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Arrays

TanStack Form supports arrays as values in a form, including sub-object values inside of an array.

# Basic Usage
## Basic Usage

To use an array, you can use `field.api.state.value` on an array value:

Expand Down
2 changes: 1 addition & 1 deletion docs/framework/angular/guides/basic-concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Each field has its own state, which includes its current value, validation statu
Example:

```tsx
const { value, error, touched, isValidating } = field.state
const { value, meta: { errors, isValidating } } = field.state
```

There are three field states can be very useful to see how the user interacts with a field. A field is _"touched"_ when the user clicks/tabs into it, _"pristine"_ until the user changes value in it, and _"dirty"_ after the value has been changed. You can check these states via the `isTouched`, `isPristine` and `isDirty` flags, as seen below.
Expand Down
2 changes: 1 addition & 1 deletion docs/framework/react/guides/arrays.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Arrays

TanStack Form supports arrays as values in a form, including sub-object values inside of an array.

# Basic Usage
## Basic Usage

To use an array, you can use `field.state.value` on an array value:

Expand Down
2 changes: 1 addition & 1 deletion docs/framework/react/guides/basic-concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Each field has its own state, which includes its current value, validation statu
Example:

```tsx
const { value, error, touched, isValidating } = field.state
const { value, meta: { errors, isValidating } } = field.state
```

There are three field states can be very useful to see how the user interacts with a field. A field is _"touched"_ when the user clicks/tabs into it, _"pristine"_ until the user changes value in it, and _"dirty"_ after the value has been changed. You can check these states via the `isTouched`, `isPristine` and `isDirty` flags, as seen below.
Expand Down
5 changes: 4 additions & 1 deletion docs/framework/react/guides/linked-fields.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Link Two Form Fields Together
---
id: linked-fields
title: Link Two Form Fields Together
---

You may find yourself needing to link two fields together; when one is validated as another field's value has changed.
One such usage is when you have both a `password` and `confirm_password` field,
Expand Down
2 changes: 1 addition & 1 deletion docs/framework/vue/guides/basic-concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Each field has its own state, which includes its current value, validation statu
Example:

```js
const { value, error, touched, isValidating } = field.state
const { value, meta: { errors, isValidating } } = field.state
```

There are three field states can be very useful to see how the user interacts with a field. A field is _"touched"_ when the user clicks/tabs into it, _"pristine"_ until the user changes value in it, and _"dirty"_ after the value has been changed. You can check these states via the `isTouched`, `isPristine` and `isDirty` flags, as seen below.
Expand Down

0 comments on commit b7ef0e9

Please sign in to comment.