Skip to content

Commit

Permalink
docs: sync reference to 0.29 (#896)
Browse files Browse the repository at this point in the history
  • Loading branch information
Balastrong authored Aug 10, 2024
1 parent 782e82e commit d39d73d
Show file tree
Hide file tree
Showing 41 changed files with 300 additions and 162 deletions.
26 changes: 13 additions & 13 deletions docs/framework/angular/reference/classes/tanstackfield.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ api: FieldApi<TParentData, TName, TFieldValidator, TFormValidator, TData>;

#### Defined in

[tanstack-field.directive.ts:61](https://github.com/TanStack/form/blob/bde3b1cb3de955b47034f0bfaa43dec13c67999a/packages/angular-form/src/tanstack-field.directive.ts#L61)
[tanstack-field.directive.ts:61](https://github.com/TanStack/form/blob/782e82ea1fb36627b62d0f588484b4a9c3249fed/packages/angular-form/src/tanstack-field.directive.ts#L61)

***

Expand All @@ -64,7 +64,7 @@ If `true`, always run async validation, even if there are errors emitted during

#### Defined in

[tanstack-field.directive.ts:50](https://github.com/TanStack/form/blob/bde3b1cb3de955b47034f0bfaa43dec13c67999a/packages/angular-form/src/tanstack-field.directive.ts#L50)
[tanstack-field.directive.ts:50](https://github.com/TanStack/form/blob/782e82ea1fb36627b62d0f588484b4a9c3249fed/packages/angular-form/src/tanstack-field.directive.ts#L50)

***

Expand All @@ -82,7 +82,7 @@ The default time to debounce async validation if there is not a more specific de

#### Defined in

[tanstack-field.directive.ts:49](https://github.com/TanStack/form/blob/bde3b1cb3de955b47034f0bfaa43dec13c67999a/packages/angular-form/src/tanstack-field.directive.ts#L49)
[tanstack-field.directive.ts:49](https://github.com/TanStack/form/blob/782e82ea1fb36627b62d0f588484b4a9c3249fed/packages/angular-form/src/tanstack-field.directive.ts#L49)

***

Expand All @@ -100,7 +100,7 @@ An optional object with default metadata for the field.

#### Defined in

[tanstack-field.directive.ts:59](https://github.com/TanStack/form/blob/bde3b1cb3de955b47034f0bfaa43dec13c67999a/packages/angular-form/src/tanstack-field.directive.ts#L59)
[tanstack-field.directive.ts:59](https://github.com/TanStack/form/blob/782e82ea1fb36627b62d0f588484b4a9c3249fed/packages/angular-form/src/tanstack-field.directive.ts#L59)

***

Expand All @@ -118,7 +118,7 @@ An optional default value for the field.

#### Defined in

[tanstack-field.directive.ts:48](https://github.com/TanStack/form/blob/bde3b1cb3de955b47034f0bfaa43dec13c67999a/packages/angular-form/src/tanstack-field.directive.ts#L48)
[tanstack-field.directive.ts:48](https://github.com/TanStack/form/blob/782e82ea1fb36627b62d0f588484b4a9c3249fed/packages/angular-form/src/tanstack-field.directive.ts#L48)

***

Expand All @@ -136,7 +136,7 @@ The field name. The type will be `DeepKeys<TParentData>` to ensure your name is

#### Defined in

[tanstack-field.directive.ts:44](https://github.com/TanStack/form/blob/bde3b1cb3de955b47034f0bfaa43dec13c67999a/packages/angular-form/src/tanstack-field.directive.ts#L44)
[tanstack-field.directive.ts:44](https://github.com/TanStack/form/blob/782e82ea1fb36627b62d0f588484b4a9c3249fed/packages/angular-form/src/tanstack-field.directive.ts#L44)

***

Expand All @@ -148,7 +148,7 @@ tanstackField: FormApi<TParentData, TFormValidator>;

#### Defined in

[tanstack-field.directive.ts:52](https://github.com/TanStack/form/blob/bde3b1cb3de955b47034f0bfaa43dec13c67999a/packages/angular-form/src/tanstack-field.directive.ts#L52)
[tanstack-field.directive.ts:52](https://github.com/TanStack/form/blob/782e82ea1fb36627b62d0f588484b4a9c3249fed/packages/angular-form/src/tanstack-field.directive.ts#L52)

***

Expand All @@ -164,7 +164,7 @@ optional unmount: () => void;

#### Defined in

[tanstack-field.directive.ts:76](https://github.com/TanStack/form/blob/bde3b1cb3de955b47034f0bfaa43dec13c67999a/packages/angular-form/src/tanstack-field.directive.ts#L76)
[tanstack-field.directive.ts:76](https://github.com/TanStack/form/blob/782e82ea1fb36627b62d0f588484b4a9c3249fed/packages/angular-form/src/tanstack-field.directive.ts#L76)

***

Expand All @@ -182,7 +182,7 @@ A validator provided by an extension, like `yupValidator` from `@tanstack/yup-fo

#### Defined in

[tanstack-field.directive.ts:51](https://github.com/TanStack/form/blob/bde3b1cb3de955b47034f0bfaa43dec13c67999a/packages/angular-form/src/tanstack-field.directive.ts#L51)
[tanstack-field.directive.ts:51](https://github.com/TanStack/form/blob/782e82ea1fb36627b62d0f588484b4a9c3249fed/packages/angular-form/src/tanstack-field.directive.ts#L51)

***

Expand All @@ -200,7 +200,7 @@ A list of validators to pass to the field

#### Defined in

[tanstack-field.directive.ts:56](https://github.com/TanStack/form/blob/bde3b1cb3de955b47034f0bfaa43dec13c67999a/packages/angular-form/src/tanstack-field.directive.ts#L56)
[tanstack-field.directive.ts:56](https://github.com/TanStack/form/blob/782e82ea1fb36627b62d0f588484b4a9c3249fed/packages/angular-form/src/tanstack-field.directive.ts#L56)

## Methods

Expand All @@ -225,7 +225,7 @@ children are checked.

#### Defined in

[tanstack-field.directive.ts:88](https://github.com/TanStack/form/blob/bde3b1cb3de955b47034f0bfaa43dec13c67999a/packages/angular-form/src/tanstack-field.directive.ts#L88)
[tanstack-field.directive.ts:88](https://github.com/TanStack/form/blob/782e82ea1fb36627b62d0f588484b4a9c3249fed/packages/angular-form/src/tanstack-field.directive.ts#L88)

***

Expand All @@ -248,7 +248,7 @@ before a directive, pipe, or service instance is destroyed.

#### Defined in

[tanstack-field.directive.ts:84](https://github.com/TanStack/form/blob/bde3b1cb3de955b47034f0bfaa43dec13c67999a/packages/angular-form/src/tanstack-field.directive.ts#L84)
[tanstack-field.directive.ts:84](https://github.com/TanStack/form/blob/782e82ea1fb36627b62d0f588484b4a9c3249fed/packages/angular-form/src/tanstack-field.directive.ts#L84)

***

Expand All @@ -274,4 +274,4 @@ It is invoked only once when the directive is instantiated.

#### Defined in

[tanstack-field.directive.ts:78](https://github.com/TanStack/form/blob/bde3b1cb3de955b47034f0bfaa43dec13c67999a/packages/angular-form/src/tanstack-field.directive.ts#L78)
[tanstack-field.directive.ts:78](https://github.com/TanStack/form/blob/782e82ea1fb36627b62d0f588484b4a9c3249fed/packages/angular-form/src/tanstack-field.directive.ts#L78)
2 changes: 1 addition & 1 deletion docs/framework/angular/reference/functions/injectform.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ function injectForm<TFormData, TFormValidator>(opts?): FormApi<TFormData, TFormV

## Defined in

[inject-form.ts:4](https://github.com/TanStack/form/blob/bde3b1cb3de955b47034f0bfaa43dec13c67999a/packages/angular-form/src/inject-form.ts#L4)
[inject-form.ts:4](https://github.com/TanStack/form/blob/782e82ea1fb36627b62d0f588484b4a9c3249fed/packages/angular-form/src/inject-form.ts#L4)
2 changes: 1 addition & 1 deletion docs/framework/angular/reference/functions/injectstore.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ function injectStore<TFormData, TFormValidator, TSelected>(form, selector?): Sig

## Defined in

[inject-store.ts:4](https://github.com/TanStack/form/blob/bde3b1cb3de955b47034f0bfaa43dec13c67999a/packages/angular-form/src/inject-store.ts#L4)
[inject-store.ts:4](https://github.com/TanStack/form/blob/782e82ea1fb36627b62d0f588484b4a9c3249fed/packages/angular-form/src/inject-store.ts#L4)
10 changes: 5 additions & 5 deletions docs/framework/lit/reference/classes/tanstackformcontroller.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ new TanStackFormController<TParentData, TFormValidator>(host, config?): TanStack
#### Defined in
[tanstack-form-controller.ts:93](https://github.com/TanStack/form/blob/bde3b1cb3de955b47034f0bfaa43dec13c67999a/packages/lit-form/src/tanstack-form-controller.ts#L93)
[tanstack-form-controller.ts:93](https://github.com/TanStack/form/blob/782e82ea1fb36627b62d0f588484b4a9c3249fed/packages/lit-form/src/tanstack-form-controller.ts#L93)
## Properties
Expand All @@ -47,7 +47,7 @@ api: FormApi<TParentData, TFormValidator>;
#### Defined in
[tanstack-form-controller.ts:91](https://github.com/TanStack/form/blob/bde3b1cb3de955b47034f0bfaa43dec13c67999a/packages/lit-form/src/tanstack-form-controller.ts#L91)
[tanstack-form-controller.ts:91](https://github.com/TanStack/form/blob/782e82ea1fb36627b62d0f588484b4a9c3249fed/packages/lit-form/src/tanstack-form-controller.ts#L91)
## Methods
Expand Down Expand Up @@ -101,7 +101,7 @@ render: renderCallback<TParentData, TName, TFieldValidator, TFormValidator, TDat
#### Defined in
[tanstack-form-controller.ts:112](https://github.com/TanStack/form/blob/bde3b1cb3de955b47034f0bfaa43dec13c67999a/packages/lit-form/src/tanstack-form-controller.ts#L112)
[tanstack-form-controller.ts:112](https://github.com/TanStack/form/blob/782e82ea1fb36627b62d0f588484b4a9c3249fed/packages/lit-form/src/tanstack-form-controller.ts#L112)
***
Expand All @@ -125,7 +125,7 @@ which is only called when the component is connected to the document.
#### Defined in
[tanstack-form-controller.ts:102](https://github.com/TanStack/form/blob/bde3b1cb3de955b47034f0bfaa43dec13c67999a/packages/lit-form/src/tanstack-form-controller.ts#L102)
[tanstack-form-controller.ts:102](https://github.com/TanStack/form/blob/782e82ea1fb36627b62d0f588484b4a9c3249fed/packages/lit-form/src/tanstack-form-controller.ts#L102)
***
Expand All @@ -150,4 +150,4 @@ document.
#### Defined in
[tanstack-form-controller.ts:108](https://github.com/TanStack/form/blob/bde3b1cb3de955b47034f0bfaa43dec13c67999a/packages/lit-form/src/tanstack-form-controller.ts#L108)
[tanstack-form-controller.ts:108](https://github.com/TanStack/form/blob/782e82ea1fb36627b62d0f588484b4a9c3249fed/packages/lit-form/src/tanstack-form-controller.ts#L108)
2 changes: 1 addition & 1 deletion docs/framework/react/reference/functions/field.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ The `Field` component uses the `useField` hook internally to manage the field in

## Defined in

[useField.tsx:163](https://github.com/TanStack/form/blob/bde3b1cb3de955b47034f0bfaa43dec13c67999a/packages/react-form/src/useField.tsx#L163)
[useField.tsx:163](https://github.com/TanStack/form/blob/782e82ea1fb36627b62d0f588484b4a9c3249fed/packages/react-form/src/useField.tsx#L163)
2 changes: 1 addition & 1 deletion docs/framework/react/reference/functions/usefield.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ The `FieldApi` instance for the specified field.

## Defined in

[useField.tsx:49](https://github.com/TanStack/form/blob/bde3b1cb3de955b47034f0bfaa43dec13c67999a/packages/react-form/src/useField.tsx#L49)
[useField.tsx:49](https://github.com/TanStack/form/blob/782e82ea1fb36627b62d0f588484b4a9c3249fed/packages/react-form/src/useField.tsx#L49)
4 changes: 2 additions & 2 deletions docs/framework/react/reference/functions/useform.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ This API encapsulates all the necessary functionalities related to the form. It

## Returns

`FormApi`\<`TFormData`, `TFormValidator`\> & `ReactFormApi`\<`TFormData`, `TFormValidator`\>
`FormApi`\<`TFormData`, `TFormValidator`\> & [`ReactFormApi`](../interfaces/reactformapi.md)\<`TFormData`, `TFormValidator`\>

## Defined in

[useForm.tsx:56](https://github.com/TanStack/form/blob/bde3b1cb3de955b47034f0bfaa43dec13c67999a/packages/react-form/src/useForm.tsx#L56)
[useForm.tsx:56](https://github.com/TanStack/form/blob/782e82ea1fb36627b62d0f588484b4a9c3249fed/packages/react-form/src/useForm.tsx#L56)
26 changes: 3 additions & 23 deletions docs/framework/react/reference/functions/usetransform.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: useTransform
# Function: useTransform()

```ts
function useTransform<TFormData, TFormValidator>(fn, deps): object
function useTransform<TFormData, TFormValidator>(fn, deps): FormTransform<TFormData, TFormValidator>
```

## Type Parameters
Expand All @@ -23,28 +23,8 @@ function useTransform<TFormData, TFormValidator>(fn, deps): object

## Returns

`object`

### deps

```ts
deps: unknown[];
```

### fn()

```ts
fn: (formBase) => FormApi<TFormData, TFormValidator>;
```

#### Parameters

**formBase**: `FormApi`\<`any`, `any`\>

#### Returns

`FormApi`\<`TFormData`, `TFormValidator`\>
`FormTransform`\<`TFormData`, `TFormValidator`\>

## Defined in

[useTransform.ts:3](https://github.com/TanStack/form/blob/bde3b1cb3de955b47034f0bfaa43dec13c67999a/packages/react-form/src/useTransform.ts#L3)
[useTransform.ts:3](https://github.com/TanStack/form/blob/782e82ea1fb36627b62d0f588484b4a9c3249fed/packages/react-form/src/useTransform.ts#L3)
4 changes: 4 additions & 0 deletions docs/framework/react/reference/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ title: "@tanstack/react-form"

# @tanstack/react-form

## Interfaces

- [ReactFormApi](interfaces/reactformapi.md)

## Type Aliases

- [FieldComponent](type-aliases/fieldcomponent.md)
Expand Down
110 changes: 110 additions & 0 deletions docs/framework/react/reference/interfaces/reactformapi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
---
id: ReactFormApi
title: ReactFormApi
---

# Interface: ReactFormApi\<TFormData, TFormValidator\>

Fields that are added onto the `FormAPI` from `@tanstack/form-core` and returned from `useForm`

## Type Parameters

**TFormData**

**TFormValidator** *extends* `Validator`\<`TFormData`, `unknown`\> \| `undefined` = `undefined`

## Properties

### Field

```ts
Field: FieldComponent<TFormData, TFormValidator>;
```

A React component to render form fields. With this, you can render and manage individual form fields.

#### Defined in

[useForm.tsx:20](https://github.com/TanStack/form/blob/782e82ea1fb36627b62d0f588484b4a9c3249fed/packages/react-form/src/useForm.tsx#L20)

***

### Subscribe()

```ts
Subscribe: <TSelected>(props) => ReactNode;
```

A `Subscribe` function that allows you to listen and react to changes in the form's state. It's especially useful when you need to execute side effects or render specific components in response to state updates.

#### Type Parameters

**TSelected** = `FormState`\<`TFormData`\>

#### Parameters

**props**

**props.children**: `ReactNode` \| (`state`) => `ReactNode`

**props.selector?**

TypeScript versions <=5.0.4 have a bug that prevents
the type of the `TSelected` generic from being inferred
from the return type of this method.

In these versions, `TSelected` will fall back to the default
type (or `unknown` if that's not defined).

**See**

- [This discussion on GitHub for the details](https://github.com/TanStack/form/pull/606/files#r1506715714)
- [The bug report in `microsoft/TypeScript`](https://github.com/microsoft/TypeScript/issues/52786)

#### Returns

`ReactNode`

#### Defined in

[useForm.tsx:34](https://github.com/TanStack/form/blob/782e82ea1fb36627b62d0f588484b4a9c3249fed/packages/react-form/src/useForm.tsx#L34)

***

### useField

```ts
useField: UseField<TFormData, TFormValidator>;
```

A custom React hook that provides functionalities related to individual form fields. It gives you access to field values, errors, and allows you to set or update field values.

#### Defined in

[useForm.tsx:24](https://github.com/TanStack/form/blob/782e82ea1fb36627b62d0f588484b4a9c3249fed/packages/react-form/src/useForm.tsx#L24)

***

### useStore()

```ts
useStore: <TSelected>(selector?) => TSelected;
```

A `useStore` hook that connects to the internal store of the form. It can be used to access the form's current state or any other related state information. You can optionally pass in a selector function to cherry-pick specific parts of the state

#### Type Parameters

**TSelected** = `FormState`\<`TFormData`\>

#### Parameters

**selector?**

#### Returns

`TSelected`

#### Defined in

[useForm.tsx:28](https://github.com/TanStack/form/blob/782e82ea1fb36627b62d0f588484b4a9c3249fed/packages/react-form/src/useForm.tsx#L28)
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ A type alias representing a field component for a specific form data type.

## Defined in

[useField.tsx:133](https://github.com/TanStack/form/blob/bde3b1cb3de955b47034f0bfaa43dec13c67999a/packages/react-form/src/useField.tsx#L133)
[useField.tsx:133](https://github.com/TanStack/form/blob/782e82ea1fb36627b62d0f588484b4a9c3249fed/packages/react-form/src/useField.tsx#L133)
2 changes: 1 addition & 1 deletion docs/framework/react/reference/type-aliases/usefield.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ A function that takes an optional object with a `name` property and field option

## Defined in

[useField.tsx:25](https://github.com/TanStack/form/blob/bde3b1cb3de955b47034f0bfaa43dec13c67999a/packages/react-form/src/useField.tsx#L25)
[useField.tsx:25](https://github.com/TanStack/form/blob/782e82ea1fb36627b62d0f588484b4a9c3249fed/packages/react-form/src/useField.tsx#L25)
2 changes: 1 addition & 1 deletion docs/framework/solid/reference/functions/createfield.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ function createField<TParentData, TName, TFieldValidator, TFormValidator, TData>

## Defined in

[createField.tsx:87](https://github.com/TanStack/form/blob/bde3b1cb3de955b47034f0bfaa43dec13c67999a/packages/solid-form/src/createField.tsx#L87)
[createField.tsx:87](https://github.com/TanStack/form/blob/782e82ea1fb36627b62d0f588484b4a9c3249fed/packages/solid-form/src/createField.tsx#L87)
2 changes: 1 addition & 1 deletion docs/framework/solid/reference/functions/createform.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ function createForm<TParentData, TFormValidator>(opts?): FormApi<TParentData, TF

## Defined in

[createForm.tsx:29](https://github.com/TanStack/form/blob/bde3b1cb3de955b47034f0bfaa43dec13c67999a/packages/solid-form/src/createForm.tsx#L29)
[createForm.tsx:29](https://github.com/TanStack/form/blob/782e82ea1fb36627b62d0f588484b4a9c3249fed/packages/solid-form/src/createForm.tsx#L29)
2 changes: 1 addition & 1 deletion docs/framework/solid/reference/functions/field.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ function Field<TParentData, TName, TFieldValidator, TFormValidator, TData>(props

## Defined in

[createField.tsx:185](https://github.com/TanStack/form/blob/bde3b1cb3de955b47034f0bfaa43dec13c67999a/packages/solid-form/src/createField.tsx#L185)
[createField.tsx:185](https://github.com/TanStack/form/blob/782e82ea1fb36627b62d0f588484b4a9c3249fed/packages/solid-form/src/createField.tsx#L185)
2 changes: 1 addition & 1 deletion docs/framework/solid/reference/type-aliases/createfield.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ type CreateField<TParentData, TFormValidator>: <TName, TFieldValidator, TData>(o

## Defined in

[createField.tsx:29](https://github.com/TanStack/form/blob/bde3b1cb3de955b47034f0bfaa43dec13c67999a/packages/solid-form/src/createField.tsx#L29)
[createField.tsx:29](https://github.com/TanStack/form/blob/782e82ea1fb36627b62d0f588484b4a9c3249fed/packages/solid-form/src/createField.tsx#L29)
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ type FieldComponent<TParentData, TFormValidator>: <TName, TFieldValidator, TData

## Defined in

[createField.tsx:160](https://github.com/TanStack/form/blob/bde3b1cb3de955b47034f0bfaa43dec13c67999a/packages/solid-form/src/createField.tsx#L160)
[createField.tsx:160](https://github.com/TanStack/form/blob/782e82ea1fb36627b62d0f588484b4a9c3249fed/packages/solid-form/src/createField.tsx#L160)
Loading

0 comments on commit d39d73d

Please sign in to comment.