Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
jakedee authored Jan 21, 2021
2 parents cc499a5 + 7f27ae4 commit 7d6610e
Show file tree
Hide file tree
Showing 28 changed files with 133 additions and 119 deletions.
5 changes: 5 additions & 0 deletions .changeset/brown-jokes-act.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'formik': patch
---

Prevent calling getSelectedValues when the element has not options
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
github: [jaredpalmer] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: formik
ko_fi: # Replace with a single Ko-fi username
Expand Down
Original file line number Diff line number Diff line change
@@ -1,43 +1,46 @@
---
name: "\U0001F41B Bug report"
about: Create a report to help make Formik better
---

## 🐛 Bug report

### Current Behavior

<!-- If applicable, add screenshots to help explain your problem. -->

### Expected behavior

<!-- A clear and concise description of what you expected to happen. -->

### Reproducible example

<!-- Use one of the Codesandbox templates: -->

<!-- Formik template: https://codesandbox.io/s/91q6rxmmrp -->

<!-- withFormik template: https://codesandbox.io/s/437wy20rx4 -->

### Suggested solution(s)

<!-- How could we solve this bug? What changes would need to made to Formik? -->

### Additional context

<!-- Add any other context about the problem here. -->

### Your environment

<!-- PLEASE FILL THIS OUT -->

| Software | Version(s) |
| ---------------- | ---------- |
| Formik |
| React |
| TypeScript |
| Browser |
| npm/Yarn |
| Operating System |
---
name: Bug report
about: Create a bug report for Formik / examples
title: ''
labels: 'Type: Bug'
assignees: ''
---

## Bug report

### Current Behavior

<!-- If applicable, add screenshots to help explain your problem. -->

### Expected behavior

<!-- A clear and concise description of what you expected to happen. -->

### Reproducible example

<!-- Use one of the Codesandbox templates: -->

<!-- Formik template: https://codesandbox.io/s/91q6rxmmrp -->

<!-- withFormik template: https://codesandbox.io/s/437wy20rx4 -->

### Suggested solution(s)

<!-- How could we solve this bug? What changes would need to made to Formik? -->

### Additional context

<!-- Add any other context about the problem here. -->

### Your environment

<!-- PLEASE FILL THIS OUT -->

| Software | Version(s) |
| ---------------- | ---------- |
| Formik |
| React |
| TypeScript |
| Browser |
| npm/Yarn |
| Operating System |
Original file line number Diff line number Diff line change
@@ -1,32 +1,35 @@
---
name: "\U0001F680Feature request"
about: Suggest an idea for Formik
---

## 🚀 Feature request

### Current Behavior

<!-- A clear and concise description of what is the current behavior / use. -->

### Desired Behavior

<!-- A clear and concise description of what you want to happen. -->

### Suggested Solution

<!-- Suggest a solution that the community/maintainers/you may take to enable the desired behavior -->

<!-- NOTE: Feature Requests without suggested solutions may not be addressed or treated with the same level of urgency as those that have suggested solutions. -->

### Who does this impact? Who is this for?

<!-- Who is this for? All users? TypeScript users? Beginners? Advanced? Yourself? People using X, Y, X, etc.? -->

### Describe alternatives you've considered

<!-- A clear and concise description of any alternative solutions or features you've considered. -->

### Additional context

<!-- Add any other context or links about the feature request here. -->
---
name: Feature request
about: Request a new feature for Formik
title: ''
labels: 'Type: Feature Request'
assignees: ''
---

## Feature request

### Current Behavior

<!-- A clear and concise description of what is the current behavior / use. -->

### Desired Behavior

<!-- A clear and concise description of what you want to happen. -->

### Suggested Solution

<!-- Suggest a solution that the community/maintainers/you may take to enable the desired behavior -->

<!-- NOTE: Feature Requests without suggested solutions may not be addressed or treated with the same level of urgency as those that have suggested solutions. -->

### Who does this impact? Who is this for?

<!-- Who is this for? All users? TypeScript users? Beginners? Advanced? Yourself? People using X, Y, X, etc.? -->

### Describe alternatives you've considered

<!-- A clear and concise description of any alternative solutions or features you've considered. -->

### Additional context

<!-- Add any other context or links about the feature request here. -->
6 changes: 0 additions & 6 deletions .github/ISSUE_TEMPLATE/Documentation.md

This file was deleted.

8 changes: 0 additions & 8 deletions .github/ISSUE_TEMPLATE/Question.md

This file was deleted.

8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Ask a question
url: https://github.com/formium/formik/discussions
about: Ask questions and discuss with other community members
- name: Join the Discord server
url: https://discord.gg/pJSg287
about: Chat with other community members in real-time
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@mdx-js/react": "^1.5.1",
"@mdx-js/tag": "^0.20.3",
"@next/mdx": "^9.4.0",
"@next/plugin-google-analytics": "^9.5.5",
"@next/plugin-google-analytics": "^10.0.3",
"@zeit/fetch": "^6.0.0",
"@zeit/react-jsx-parser": "^2.0.0",
"async-sema": "^3.1.0",
Expand Down
2 changes: 1 addition & 1 deletion docs/src/components/LayoutDocs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ function SidebarRoutes({
const pagePath = removeFromLast(path!, '.');
const pathname = addTagToSlug(pagePath, tag!);

const selected = slug.startsWith(pagePath);
const selected = slug === pagePath;
const route = { href: pagePath, path, title, pathname, selected };

return (
Expand Down
6 changes: 3 additions & 3 deletions docs/src/lib/get-route-context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export function getRouteContext(
parent && i === 0
? {
...route,
title: `${parent.title}: ${route.title}`,
title: `${_route.title} | ${parent.title}`,
}
: route;

Expand All @@ -51,7 +51,7 @@ export function getRouteContext(
..._route,
title:
parent && !parent.heading
? `${parent.title}: ${_route.title}`
? `${_route.title} | ${parent.title}`
: _route.title,
};
// Continue the loop until we know the next route
Expand All @@ -62,7 +62,7 @@ export function getRouteContext(
parent && !parent.heading && !routes[i + 1]?.path
? {
...route,
title: `${parent.title}: ${route.title}`,
title: `${route.title} | ${parent.title}`,
}
: route;
}
Expand Down
10 changes: 0 additions & 10 deletions docs/src/manifests/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,6 @@
}
]
},
{
"title": "With React UI Frameworks",
"open": false,
"routes": [
{
"title": "Material UI",
"path": "/docs/with-react-ui-frameworks/with-material-ui.md"
}
]
},
{
"title": "Examples",
"open": true,
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/blog/[...slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ const RenderPost = ({ post, redirect, preview }: any) => {
<Sticky className="z-20">
<Nav />
</Sticky>
<Seo title={post.Page} />
<Seo title={post.Page + ' | Blog'} />
{preview && (
<div className={blogStyles.previewAlertContainer}>
<div className={blogStyles.previewAlert}>
Expand Down
1 change: 1 addition & 0 deletions docs/src/pages/docs/3rd-party-bindings.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: 3rd Party Bindings
original_id: 3rd-party-bindings
description: Use Formik with popular React component libraries like Material UI, Bootstrap, AntD, Semantic UI, and more.
---

If you would like to use Formik with a UI framework, you'll probably want to create a wrapper component that binds Formik's props and callbacks.
Expand Down
4 changes: 2 additions & 2 deletions docs/src/pages/docs/api/fastfield.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ title: <FastField />

## Before we start

`<FastField />` is meant for performance _optimization_. However, you really do not need to use it until you do. Only proceed if you are familiar with how React's [`shouldComponentUpdate()`](https://reactjs.org/docs-component.html#shouldcomponentupdate) works. You have been warned.
`<FastField />` is meant for performance _optimization_. However, you really do not need to use it until you do. Only proceed if you are familiar with how React's [`shouldComponentUpdate()`](https://reactjs.org/docs/react-component.html#shouldcomponentupdate) works. You have been warned.

**No. Seriously. Please review the following parts of the official React documentation before continuing**

- [React `shouldComponentUpdate()` Reference](https://reactjs.org/docs-component.html#shouldcomponentupdate)
- [React `shouldComponentUpdate()` Reference](https://reactjs.org/docs/react-component.html#shouldcomponentupdate)
- [`shouldComponentUpdate` in Action](https://reactjs.org/docs/optimizing-performance.html#shouldcomponentupdate-in-action)

## Overview
Expand Down
1 change: 1 addition & 0 deletions docs/src/pages/docs/examples.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
id: examples
title: Examples
description: Runnable examples of using Formik in React and React Native to create forms
---

## Dependent Fields
Expand Down
1 change: 1 addition & 0 deletions docs/src/pages/docs/migrating-v2.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
id: migrating-v2
title: Migrating from v1.x to v2.x
description: How to migrate from Formik v1 to v2
---

## Breaking Changes
Expand Down
1 change: 1 addition & 0 deletions docs/src/pages/docs/overview.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
id: overview
title: Overview
description: Formik documentation, tutorial, guides, and examples
---

Let's face it, forms are really verbose in
Expand Down
1 change: 1 addition & 0 deletions docs/src/pages/docs/resources.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
id: resources
title: Resources
description: Formik conference talks, courses, videos, blog posts, learning resources.
---

## Conference Talks
Expand Down
1 change: 1 addition & 0 deletions docs/src/pages/docs/tutorial.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
id: tutorial
title: Tutorial
description: Learn how to build forms in React with Formik.
---

## Before we start
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const Home: React.FC<HomeProps> = props => {
description="React hooks and components for hassle-free form validation. The world's leading companies use Formik to build forms and surveys in React and React Native."
/>
<Head>
<title>Formik - Build forms in React, without the tears</title>
<title>Formik: Build forms in React, without the tears</title>
</Head>
<div className="bg-gray-50 h-full min-h-full">
<Banner />
Expand Down
2 changes: 1 addition & 1 deletion examples/withFormik.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import * as Yup from 'yup';
import { withFormik } from '../src/formik';
import { withFormik, ErrorMessage } from '../src/formik';
import { Debug } from './Debug';

const formikEnhancer = withFormik({
Expand Down
7 changes: 7 additions & 0 deletions packages/formik-native/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# formik-native

## 2.1.14

### Patch Changes

- Updated dependencies [[`d4314a1`](https://github.com/formium/formik/commit/d4314a14cac4bfb0b2c2f1e5cf07a4fc3fb2d2d8)]:
- [email protected]

## 2.1.13

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/formik-native/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "formik-native",
"version": "2.1.13",
"version": "2.1.14",
"license": "Apache-2.0",
"author": "Jared Palmer <[email protected]>",
"repository": "formium/formik",
Expand Down Expand Up @@ -31,7 +31,7 @@
"react": ">=16.8.0"
},
"dependencies": {
"formik": "2.2.5"
"formik": "2.2.6"
},
"devDependencies": {
"@react-native-community/eslint-config": "^0.0.5",
Expand Down
6 changes: 6 additions & 0 deletions packages/formik/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# formik

## 2.2.6

### Patch Changes

- [`d4314a1`](https://github.com/formium/formik/commit/d4314a14cac4bfb0b2c2f1e5cf07a4fc3fb2d2d8) [#2955](https://github.com/formium/formik/pull/2955) Thanks [@jkbktl](https://github.com/jkbktl)! - fix(docs): fix link to docs in console warning

## 2.2.5

### Patch Changes
Expand Down
Loading

0 comments on commit 7d6610e

Please sign in to comment.