Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript: useFieldArray second argument (config) should be optional #104

Closed
Yankovsky opened this issue Aug 2, 2019 · 1 comment · Fixed by #105
Closed

Typescript: useFieldArray second argument (config) should be optional #104

Yankovsky opened this issue Aug 2, 2019 · 1 comment · Fixed by #105

Comments

@Yankovsky
Copy link
Contributor

export function useFieldArray<
  FieldValue = any,
  T extends HTMLElement = HTMLElement
>(
  name: string,
  config: UseFieldArrayConfig<FieldValue>
): FieldArrayRenderProps<FieldValue, T>

config should be optional, right? Just like in react-final-form. Readme clearly states

The useFieldArray hook takes two parameters, the first is the name of the field, and the second is an optional object that looks just like FieldArrayProps, except without the name. It returns an object just like FieldArrayRenderProps.

I'll make a pr.

@erikras
Copy link
Member

erikras commented Aug 15, 2019

Published fix in v3.1.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants