final-form / final-form/react-final-form-arrays

Missing field *length* in flow type in *fields*

Open
#164 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
210
Forks
69
PR merge metrics
No merged PRs in 30d

Description

Due missing field `length` in [fields](https://github.com/final-form/react-final-form-arrays/blob/master/src/types.js.flow#L25) by accessing it i get flow type error despite the fact that this [field](https://github.com/final-form/react-final-form-arrays/blob/master/src/useFieldArray.js#L94) exists.

### Are you submitting a **bug report** or a **feature request**?

Bug

### What is the current behavior?

Missing flow type for a field `length`

in here:
```
export type FieldArrayRenderProps = {
fields: {
...
length: number, // <<== this line need to be added
},
meta: Meta
}
```

### What is the expected behavior?

Need to add missing type

### What's your environment?
Latest version of Final Form Arrays

Contributor guide

Open the contributing guide

Research direction

Open src/types.js.flow around line 25 and compare the fields shape with src/useFieldArray.js around line 94, where length is accessed. Update the Flow type so the existing length field is represented, then confirm the reported Flow type error is resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.