Skip to content

Commit

Permalink
#378 remove setFieldTouched from FieldArray
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredpalmer committed Jan 29, 2018
1 parent 7c8753e commit b32ebfd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/FieldArray.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,10 @@ export class FieldArray extends React.Component<FieldArrayConfig, {}> {
};

changeValue = (fn: Function) => {
const { setFieldValue, setFieldTouched, values } = this.context.formik;
const { setFieldValue, values } = this.context.formik;
const { name } = this.props;
const val = fn(dlv(values, name));
setFieldValue(name, val);
setFieldTouched(name, true);
};

push = (value: any) => this.changeValue((array: any[]) => [...array, value]);
Expand Down

0 comments on commit b32ebfd

Please sign in to comment.