final-form / final-form/react-final-form
React Final Form Wizard with FieldArray and subscription throws error
- Dominant language
- JavaScript
- Stars
- 7.4k
- Forks
- 497
- PR merge metrics
- No merged PRs in 30d
Description
### Are you submitting a **bug report** or a **feature request**?
99% that's a bug and 1% the problem is in my hands.
### What is the current behavior?
Mixin of [React Final Form Wizard](https://final-form.org/docs/react-final-form/examples/wizard) with [FieldArray](https://github.com/final-form/react-final-form-arrays) and [subscription](https://final-form.org/docs/react-final-form/examples/subscriptions) throws error: "Cannot read property 'active' of undefined". The form still works and can be submitted if you ignore the error. If You remove subscription or FieldArray, the error disappear.
### What is the expected behavior?
There will be no errors on switching to the step of the form with FieldArray.
### Sandbox Link
[](https://codesandbox.io/s/practical-volhard-p3rvj)
### What's your environment?
```
"final-form": "latest",
"final-form-arrays": "3.0.2",
"react": "latest",
"react-bootstrap": "1.3.0",
"react-dom": "latest",
"react-final-form": "latest",
"react-final-form-arrays": "3.1.2"
```
Contributor guide
Research direction
Start with the linked CodeSandbox reproduction and compare switching wizard steps with FieldArray and subscription enabled against each feature removed. Trace the source of the “Cannot read property 'active' of undefined” error during the step change. Done means the combined setup switches steps without errors while remaining submittable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100