Skip to content
This repository was archived by the owner on Aug 23, 2022. It is now read-only.

Commit 200da5e

Browse files
committed
Fixing todos
1 parent 54c08c1 commit 200da5e

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

docs/api/Form.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,12 @@ _(Any)_ The `component` that the `<Form>` should be rendered to (default: `"form
155155
_(Function)_ The handler function that is called with the form state whenever the form state is updated.
156156

157157
### Notes
158-
- This is an optional but useful property, especially if you are using [local forms](TODO).
158+
- This is an optional but useful property, especially if you are using [local forms](../guides/local.md).
159159
- Remember: the _form state_ is the state related to the form and its fields, such as whether it's valid, focused, pristine, etc.
160160

161161
## `onChange={(modelValue) => ...}`
162162
_(Function)_ The handler function that is called with the form's model value whenever the model value is updated.
163163

164164
### Notes
165-
- This is also an optional but useful property, especially if you are using [local forms](TODO).
165+
- This is also an optional but useful property, especially if you are using [local forms](../guides/local.md).
166166
- Remember: the _model value_ is the value of the form's model, specified by the `model="..."` prop. The entire model value will be passed in.

docs/api/actions.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
All model and field action creators can be imported via `import { actions } from 'react-redux-form'`. The action thunk creators require [redux-thunk middleware](https://github.com/gaearon/redux-thunk) to work, as they use thunks to get the current model state.
4343

44-
Also, all action creators are **trackable**, which means that the `model` argument can be a function, such as [`track()`](TODO), that returns a string model path given the store's state. For example:
44+
Also, all action creators are **trackable**, which means that the `model` argument can be a function, such as [`track()`](../guides/tracking.md), that returns a string model path given the store's state. For example:
4545

4646
```jsx
4747
import { track, actions } from 'react-redux-form';
@@ -58,7 +58,7 @@ dispatch(actions.change(
5858

5959
Returns an action that, when handled by a `modelReducer`, changes the value of the `model` to the `value`.
6060

61-
When the change action is handled by a [`formReducer`](TODO), the field model's `.dirty` state is set to `true` and its corresponding `.pristine` state is set to `false`.
61+
When the change action is handled by a [`formReducer`](./formReducer), the field model's `.dirty` state is set to `true` and its corresponding `.pristine` state is set to `false`.
6262

6363
### Arguments
6464
- `model` _(String | Function)_: the model whose value will be changed
@@ -277,7 +277,7 @@ All model and field actions can be imported via `import { actions } from 'react-
277277
278278
<h2 id="actions-focus"></h2>
279279
## `actions.focus(model)`
280-
Returns an action that, when handled by a [`formReducer`](TODO), changes the `.focus` state of the field model in the form to `true`.
280+
Returns an action that, when handled by a [`formReducer`](./formReducer), changes the `.focus` state of the field model in the form to `true`.
281281
282282
The "focus" state indicates that the field model is the currently focused field in the form.
283283
@@ -308,7 +308,7 @@ const Newsletter = (props) => {
308308
309309
<h2 id="actions-blur"></h2>
310310
## `actions.blur(model)`
311-
Returns an action that, when handled by a [`formReducer`](TODO), changes the `.focus` state to `false`. It also indicates that the field model has been `.touched`, and will set that state to `true`.
311+
Returns an action that, when handled by a [`formReducer`](./formReducer), changes the `.focus` state to `false`. It also indicates that the field model has been `.touched`, and will set that state to `true`.
312312
313313
A "blurred" field indicates that the field model control is not currently focused.
314314
@@ -317,7 +317,7 @@ A "blurred" field indicates that the field model control is not currently focuse
317317
318318
<h2 id="actions-setPristine"></h2>
319319
## `actions.setPristine(model)`
320-
Returns an action that, when handled by a [`formReducer`](TODO), changes the `.pristine` state of the field model in the form to `true`.
320+
Returns an action that, when handled by a [`formReducer`](./formReducer), changes the `.pristine` state of the field model in the form to `true`.
321321
322322
The "pristine" state indicates that the user has not interacted with this field model yet.
323323
@@ -331,7 +331,7 @@ The "pristine" state indicates that the user has not interacted with this field
331331
332332
<h2 id="actions-setDirty"></h2>
333333
## `actions.setDirty(model)`
334-
Returns an action that, when handled by a [`formReducer`](TODO), changes the `.pristine` state to `false`.
334+
Returns an action that, when handled by a [`formReducer`](./formReducer), changes the `.pristine` state to `false`.
335335
336336
A "dirty" field indicates that the model value has been changed, and is no longer pristine.
337337
@@ -343,7 +343,7 @@ A "dirty" field indicates that the model value has been changed, and is no longe
343343
344344
<h2 id="actions-setPending"></h2>
345345
## `actions.setPending(model, [pending])`
346-
Returns an action that, when handled by a [`formReducer`](TODO), changes the `.pending` state of the field model in the form to `true`. It simultaneously sets the `.submitted` state to `false`.
346+
Returns an action that, when handled by a [`formReducer`](./formReducer), changes the `.pending` state of the field model in the form to `true`. It simultaneously sets the `.submitted` state to `false`.
347347
348348
### Arguments
349349
- `model` _(String | Function)_: the model indicated as pending
@@ -355,7 +355,7 @@ Returns an action that, when handled by a [`formReducer`](TODO), changes the `.p
355355

356356
<h2 id="actions-setTouched"></h2>
357357
## `actions.setTouched(model)`
358-
Returns an action that, when handled by a [`formReducer`](TODO), changes the `.touched` state of the field model in the form to `true`. It simultaneously sets the `.untouched` state to `false`.
358+
Returns an action that, when handled by a [`formReducer`](./formReducer), changes the `.touched` state of the field model in the form to `true`. It simultaneously sets the `.untouched` state to `false`.
359359

360360
The "touched" state indicates that this model has been interacted with.
361361

@@ -368,7 +368,7 @@ The "touched" state indicates that this model has been interacted with.
368368

369369
<h2 id="actions-setUntouched"></h2>
370370
## `actions.setUntouched(model)`
371-
Returns an action that, when handled by a [`formReducer`](TODO), changes the `.touched` state to `false`.
371+
Returns an action that, when handled by a [`formReducer`](./formReducer), changes the `.touched` state to `false`.
372372

373373
An "untouched" field indicates that this model has not been interacted with yet.
374374

@@ -459,7 +459,7 @@ dispatch(actions.submitFields('user', postUser));
459459

460460
<h2 id="actions-setSubmitted"></h2>
461461
## `actions.setSubmitted(model, [submitted])`
462-
Returns an action that, when handled by a [`formReducer`](TODO), changes the `.submitted` state of the field model in the form to `submitted` (`true` or `false`). It simultaneously sets the `.pending` state to the inverse of `submitted`.
462+
Returns an action that, when handled by a [`formReducer`](./formReducer), changes the `.submitted` state of the field model in the form to `submitted` (`true` or `false`). It simultaneously sets the `.pending` state to the inverse of `submitted`.
463463

464464
The "submitted" state indicates that this model has been "sent off," or an action has been completed for the model.
465465

@@ -491,7 +491,7 @@ export default function submitUser(data) {
491491

492492
<h2 id="actions-setSubmitFailed"></h2>
493493
## `actions.setSubmitFailed(model)`
494-
Returns an action that, when handled by a [`formReducer`](TODO), changes the `.submitFailed` state of the field model in the form to `true`. It simultaneously sets the `.pending` state to `false`, and the `.retouched` state to `false`.
494+
Returns an action that, when handled by a [`formReducer`](./formReducer), changes the `.submitFailed` state of the field model in the form to `true`. It simultaneously sets the `.pending` state to `false`, and the `.retouched` state to `false`.
495495

496496
### Arguments
497497
- `model` _(String | Function)_: the model indicated as having failed a submit
@@ -505,7 +505,7 @@ Returns an action that, when handled by a [`formReducer`](TODO), changes the `.s
505505

506506
<h2 id="actions-setInitial"></h2>
507507
## `actions.setInitial(model)`
508-
Returns an action that, when handled by a [`formReducer`](TODO), changes the state of the field model in the form to its initial state.
508+
Returns an action that, when handled by a [`formReducer`](./formReducer), changes the state of the field model in the form to its initial state.
509509

510510
Here is the default initial field state:
511511

@@ -534,7 +534,7 @@ const initialFieldState = {
534534

535535
<h2 id="actions-setValidity"></h2>
536536
## `actions.setValidity(model, validity, [options])`
537-
Returns an action that, when handled by a [`formReducer`](TODO), changes the `.valid` state of the field model in the form to `true` or `false`, based on the `validity` (see below). It will also set the `.validity` state of the field model to the `validity`.
537+
Returns an action that, when handled by a [`formReducer`](./formReducer), changes the `.valid` state of the field model in the form to `true` or `false`, based on the `validity` (see below). It will also set the `.validity` state of the field model to the `validity`.
538538

539539
It also sets the `.errors` on the field model to the inverse of the `validity`.
540540

@@ -581,7 +581,7 @@ dispatch(actions.setValidity('user.password', {
581581

582582
<h2 id="actions-setFieldsValidity"></h2>
583583
## `actions.setFieldsValidity(model, fieldsValidity)`
584-
Returns an action that, when handled by a [`formReducer`](TODO), sets the `.validity` state of each sub-model key in the `fieldsValidity` object to that key's value.
584+
Returns an action that, when handled by a [`formReducer`](./formReducer), sets the `.validity` state of each sub-model key in the `fieldsValidity` object to that key's value.
585585
586586
It simultaneously sets the `.errors` on each sub-model to the inverse of its validity.
587587
@@ -654,7 +654,7 @@ dispatch(actions.asyncSetValidity('user.email', isEmailAvailable));
654654
655655
<h2 id="actions-setErrors"></h2>
656656
## `actions.setErrors(model, errors)`
657-
Returns an action that, when handled by a [`formReducer`](TODO), changes the `.valid` state of the field model in the form to `true` or `false`, based on the `errors` (see below). It will also set the `.errors` state of the field model to the `errors`.
657+
Returns an action that, when handled by a [`formReducer`](./formReducer), changes the `.valid` state of the field model in the form to `true` or `false`, based on the `errors` (see below). It will also set the `.errors` state of the field model to the `errors`.
658658
659659
It simultaneously sets the `.validity` on the field model to the inverse of the `errors`.
660660
@@ -705,7 +705,7 @@ dispatch(actions.setErrors('user.password', {
705705
706706
<h2 id="actions-setFieldsErrors"></h2>
707707
## `actions.setFieldsErrors(model, fieldsErrors)`
708-
Returns an action that, when handled by a [`formReducer`](TODO), sets the `.errors` state of each sub-model key in the `fieldsErrors` object to that key's value.
708+
Returns an action that, when handled by a [`formReducer`](./formReducer), sets the `.errors` state of each sub-model key in the `fieldsErrors` object to that key's value.
709709
710710
It simultaneously sets the `.validity` on each sub-model to the inverse of its errors.
711711

0 commit comments

Comments
 (0)