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

Unmounting <FieldArray /> should remove the fields inside field array

Open
#738 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.4k
Forks
497
PR merge metrics
No merged PRs in 30d

Description

Current Behavior:
```
{condition && (

{({ fields }) =>
fields.map((fieldArrayName, fieldIndex) => (

))}

```
If I set condition to false, `` are still rendered.

Expected Behavior:

If I unmount the `` it should remove all the values and rendered elements from the form.

Contributor guide

Open the contributing guide

Research direction

Start with the FieldArray component and reproduce the conditional-unmount example from the issue. Trace what happens when FieldArray is removed; done means its values and rendered field elements are removed from the form.

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
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.