Skip to content

Commit

Permalink
docs: add replaceValue
Browse files Browse the repository at this point in the history
  • Loading branch information
Balastrong committed May 2, 2024
1 parent 32146dc commit af4d5e8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/reference/fieldApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,11 @@ A class representing the API for managing a form field.

- Inserts a value at the specified index, shifting the subsequent values to the right.

- ```tsx
replaceValue(index: number, value: TData): void
```
- Replaces a value at the specified index.

- ```tsx
removeValue(index: number): void
```
Expand Down
4 changes: 4 additions & 0 deletions docs/reference/formApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ A class representing the Form API. It handles the logic and interactions with th
insertFieldValue<TField extends DeepKeys<TFormData>>(field: TField, index: number, value: DeepValue<TFormData, TField>, opts?: { touch?: boolean })
```
- Inserts a value into an array field at the specified index, shifting the subsequent values to the right.
- ```tsx
replaceFieldValue<TField extends DeepKeys<TFormData>>(field: TField, index: number, value: DeepValue<TFormData, TField>, opts?: { touch?: boolean })
```
- Replaces a value into an array field at the specified index.
- ```tsx
removeFieldValue<TField extends DeepKeys<TFormData>>(field: TField, index: number, opts?: { touch?: boolean })
```
Expand Down

0 comments on commit af4d5e8

Please sign in to comment.