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

onSubmit ARRAY_ERROR does not bubble to FieldArrayRenderProps

Open
#24 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

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

Bug

### What is the current behavior?

https://codesandbox.io/s/46ozq77v7

Type "test" or "fail" in Company, then submit

### What is the expected behavior?

`errors.customers[ARRAY_ERROR]` is available somewhere in render props

Note: these props do get flagged
```
"invalid": true,
"submitFailed": true,
```

However I dont see
```
"submitError": [],
```
And an `error` prop seems to be missing

### Extra

Code Sandbox has deps lists as 4.4.0
However in render props I see, not sure whats going on there
```
"__versions": {
"final-form": "4.3.1",
"react-final-form": "3.1.5"
}
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the report in the linked CodeSandbox using the stated Company values and inspect the FieldArrayRenderProps render props around submission. Compare the observed ARRAY_ERROR handling with the expected errors.customers[ARRAY_ERROR] value and the listed dependency versions. Done means the array-level submit error is exposed through the relevant render props without losing the existing invalid and submitFailed flags.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.