Skip to content

Demos

Primitive elements

Code Editor
<Iterate.ArrayPushButton
  text="Add another element"
  value={['foo', 'bar']}
  pushValue="new"
  onChange={(value) => console.log('onChange', value)}
/>

Object elements

Code Editor
<Form.Handler
  data={[
    {
      name: 'Iron Man',
    },
    {
      name: 'Captain America',
    },
    {
      name: 'Thor',
    },
  ]}
  onChange={(value) => console.log('onChange', value)}
>
  <Iterate.Array path="/">
    <Field.String elementPath="/name" />
  </Iterate.Array>

  <Iterate.ArrayPushButton
    top="small"
    text="Add another element"
    path="/"
    pushValue={{}}
  />
</Form.Handler>