Skip to content

Commit

Permalink
fix Arrays example (#550)
Browse files Browse the repository at this point in the history
  • Loading branch information
saadq authored and jaredpalmer committed Apr 2, 2018
1 parent 14eb509 commit 164b139
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/Arrays.js
Expand Up @@ -27,7 +27,7 @@ const SignIn = () => (
<div>
{values.friends.length > 0 &&
values.friends.map((friend, index) => (
<div className="row">
<div className="row" key={index}>
<div className="col">
<label htmlFor={`friends.${index}.name`}>Name</label>
<Field
Expand All @@ -36,6 +36,7 @@ const SignIn = () => (
type="text"
/>
{errors.friends &&
errors.friends[index] &&
errors.friends[index].name &&
touched.friends &&
touched.friends[index].name && (
Expand All @@ -52,6 +53,7 @@ const SignIn = () => (
type="email"
/>
{errors.friends &&
errors.friends[index] &&
errors.friends[index].email &&
touched.friends &&
touched.friends[index].email && (
Expand Down

0 comments on commit 164b139

Please sign in to comment.