diff --git a/src/lib/forms/ArrayField.js b/src/lib/forms/ArrayField.js index d9dace20..c2178e11 100644 --- a/src/lib/forms/ArrayField.js +++ b/src/lib/forms/ArrayField.js @@ -8,7 +8,7 @@ import React, { Component } from "react"; import PropTypes from "prop-types"; import { getIn, FieldArray } from "formik"; -import { Form, Icon } from "semantic-ui-react"; +import { Form, Icon, Button } from "semantic-ui-react"; import _isEmpty from "lodash/isEmpty"; import _filter from "lodash/filter"; import _matches from "lodash/matches"; @@ -87,30 +87,32 @@ export class ArrayField extends Component { const { nextKey } = this.state; const valuesToDisplay = this.getValues(values, fieldPath); return ( - - + <> + + - {valuesToDisplay.map((value, index, array) => { - const arrayPath = fieldPath; - const indexPath = index; - const key = value.__key || index; + {valuesToDisplay.map((value, index, array) => { + const arrayPath = fieldPath; + const indexPath = index; + const key = value.__key || index; - return ( -
- {children({ - array, - arrayHelpers, - arrayPath, - indexPath, - key, - value, - ...props, - })} -
- ); - })} + return ( +
+ {children({ + array, + arrayHelpers, + arrayPath, + indexPath, + key, + value, + ...props, + })} +
+ ); + })} +
- {helpText && } + {helpText && }