diff --git a/src/containers/multiple/multiple.container.tsx b/src/containers/multiple/multiple.container.tsx index 0cc96b6..35a6c9d 100644 --- a/src/containers/multiple/multiple.container.tsx +++ b/src/containers/multiple/multiple.container.tsx @@ -21,7 +21,7 @@ export interface IMultipleProps extends IComponentProps { */ export const Multiple: React.FC = props => { const {component, form, path, value = [], setValue} = props; // FIXME: Awaits future pr. - const [keys, setKeys] = useState(Array.from({length: 1}, (_, i) => i)); + const [keys, setKeys] = useState([0]); /** Finds next key by increasing the max key with 1. */ const getKey = (): number => { @@ -47,7 +47,7 @@ export const Multiple: React.FC = props => { /** Renders individual components utilizing . */ const renderComponents = () => - Array.from({length: keys.length}, (_, index) => { + keys.map((key, index) => { // Clone and adjust component to fit nested needs. const renderable: IRenderable = { ...structuredClone(component), @@ -58,7 +58,7 @@ export const Multiple: React.FC = props => { }; return ( - + @@ -79,7 +79,7 @@ export const Multiple: React.FC = props => { -