Skip to content

Commit

Permalink
Add .vscode settings
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredpalmer committed Sep 29, 2020
1 parent b009b3b commit 5005ae6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
jobs:
release:
runs-on: ubuntu-latest

if: github.repository == 'formium/formik'
steps:
- uses: actions/checkout@v2
with:
Expand Down
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"typescript.tsdk": "node_modules/typescript/lib"
}
4 changes: 3 additions & 1 deletion docs/src/pages/docs/api/fieldarray.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,10 @@ You can also iterate through an array of objects, by following a convention of `
<div>
{values.friends.map((friend, index) => (
<div key={index}>
{/** both these conventions do the same */}
<Field name={`friends[${index}].name`} />
<Field name={`friends.${index}.age`} /> // both these conventions do the same
<Field name={`friends.${index}.age`} />

<button type="button" onClick={() => arrayHelpers.remove(index)}>
-
</button>
Expand Down
3 changes: 2 additions & 1 deletion docs/src/pages/docs/api/useField.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,11 @@ function MyOtherComponent(props) {
```

### `FieldHookConfig<Value>`

This object is a subset of the props that you would pass to `<Field>`. It contains:

- `name: string` - The name of the field
- `validate?: (value: any) => undefined | string | Promise<any>` - See [the documentaion for `<Field>`](./field#validate)
- `validate?: (value: any) => undefined | string | Promise<any>` - See [the documentaion for `<Field>`](./field#validate)
- `type?: string` - The type of the HTML input (`text`, `number` and etc.)
- `multiple?: boolean` - Whether or not the multiple values can be selected.
- `value?: string`- Works only for inputs of type `checkbox` and `radio`. When a form is submitted, checkboxes and radios are submitted with the provided `value`. Read more about it on [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#Value).
Expand Down

0 comments on commit 5005ae6

Please sign in to comment.