react-component / field-form

⚡️ React Performance First Form Component
https://field-form.react-component.now.sh/
MIT License
977 stars 266 forks source link

List render props add whole list value support #95

Open kagawagao opened 4 years ago

kagawagao commented 4 years ago

https://github.com/react-component/field-form/blob/bc56d70cd291b64c12cffac8bb265f268d630864/src/List.tsx#L107-L124 children of List could get all values from render props

<List>
  {(fields, values, operations) => (...)}
</List>
HSunboy commented 4 years ago

Try it

<Form>
      {values => {
        const usersValue = values.users;
        return <List name="users">
          ...
        </List>
      }}
</Form>