From 5005ae604b958258ed16b4bedab0a21860298d73 Mon Sep 17 00:00:00 2001 From: Jared Palmer Date: Tue, 29 Sep 2020 16:51:23 -0400 Subject: [PATCH] Add .vscode settings --- .github/workflows/release.yml | 2 +- .vscode/settings.json | 3 +++ docs/src/pages/docs/api/fieldarray.md | 4 +++- docs/src/pages/docs/api/useField.md | 3 ++- 4 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a07c25bbd..ce12a258b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,7 +6,7 @@ on: jobs: release: runs-on: ubuntu-latest - + if: github.repository == 'formium/formik' steps: - uses: actions/checkout@v2 with: diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..25fa6215f --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "typescript.tsdk": "node_modules/typescript/lib" +} diff --git a/docs/src/pages/docs/api/fieldarray.md b/docs/src/pages/docs/api/fieldarray.md index 2e0aff668..4d2ef3de2 100644 --- a/docs/src/pages/docs/api/fieldarray.md +++ b/docs/src/pages/docs/api/fieldarray.md @@ -86,8 +86,10 @@ You can also iterate through an array of objects, by following a convention of `
{values.friends.map((friend, index) => (
+ {/** both these conventions do the same */} - // both these conventions do the same + + diff --git a/docs/src/pages/docs/api/useField.md b/docs/src/pages/docs/api/useField.md index df60b233b..c73b1f2f8 100644 --- a/docs/src/pages/docs/api/useField.md +++ b/docs/src/pages/docs/api/useField.md @@ -125,10 +125,11 @@ function MyOtherComponent(props) { ``` ### `FieldHookConfig` + This object is a subset of the props that you would pass to ``. It contains: - `name: string` - The name of the field -- `validate?: (value: any) => undefined | string | Promise` - See [the documentaion for ``](./field#validate) +- `validate?: (value: any) => undefined | string | Promise` - See [the documentaion for ``](./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).