Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/useFieldArray #344

Closed
wants to merge 5 commits into from
Closed

Bugfix/useFieldArray #344

wants to merge 5 commits into from

Conversation

hannyle
Copy link
Contributor

@hannyle hannyle commented Jun 16, 2021

Description

  • Another workaround for useFieldArray bug that causes errors from which a form couldn't render (e.g. Experiment, Analysis, Run)
  • Fix for useFieldArray related fields that are hidden when editing a saved/submitted form

Related issues

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Changes Made

  • Fix path-name in FormArray component
  • Add control from useForm to useFieldArray
  • Use useEffect and react-hook-form setValue to set the correct fieldValues to the matching field
  • Update e2e test for form editing

Testing

  • Integration Tests

saulipurhonen and others added 5 commits June 15, 2021 17:47
Dedicated test for form edit

E2E testing
Render form correctly when editing

Display edited fields

Populate form fields

Render form correctly when editing
@hannyle hannyle changed the title Bugfix/use field array Bugfix/useFieldArray Jun 16, 2021
@hannyle hannyle self-assigned this Jun 16, 2021
@hannyle hannyle added the bug Something isn't working label Jun 16, 2021
@hannyle hannyle added this to the Beta - User Interaction milestone Jun 16, 2021
This was linked to issues Jun 16, 2021
Copy link
Contributor

@saulipurhonen saulipurhonen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This approach looks good to me!

@saulipurhonen
Copy link
Contributor

saulipurhonen commented Jun 21, 2021

This branch is rebased and should be reviewed in #323

@hannyle hannyle closed this Jun 22, 2021
@hannyle hannyle mentioned this pull request Jun 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Edit Experiment draft Edit does not work for all fields
2 participants