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

Try to move Fields with Conditions not working

Open
#25 8 comments 4 reactions 0 assignees View on GitHub
bug
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 report

### What is the current behavior?

When I try to Drag and Drop group of Fields with conditions to be displayed or not in a FieldArray, there is an error happening: "Cannot read property 'active' of undefined"

If you try to reproduce it from the sandbox linked below:

1. Create several customers
2. Enter on one of them "test" to validate the condition to display the lastName
3. Try to Drag and Drop a customer with the handler on the left "::"
4. The error come here 🔴

### What is the expected behavior?

The expected behavior is to be able to move Fields that have Conditions Fields inside

### Sandbox Link

[![Edit 🏁 React Final Form - Field Arrays](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/ooowlmx42y)

Contributor guide

Open the contributing guide

Research direction

Start with the linked CodeSandbox and reproduce the error by creating customers, entering "test" to conditionally display lastName, then dragging a customer with the "::" handler. Trace the FieldArray drag-and-drop path around the "Cannot read property 'active' of undefined" error; done means conditionally rendered fields can be moved without an error.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.