Child field resets when multi-value parent field updated

Created on 28 August 2024, 4 months ago

Problem/Motivation

When you have a multi-value parent field and child, when updating the parent the child field gets reset and has no values assigned to it.

Steps to reproduce

  1. Set up a Child to parent dependent fields as per this module.
  2. Set both, child and parent to be unlimited value fields.
  3. Create a node, populate the fields and save the node (All works fine upto here)
  4. Re-edit the node, add another value to the parent
  5. The child value now gets reset even though the selected value was still valid

Proposed resolution

  • The child value should remain as it is and only the options that are available to it should get updated
  • The child value should only get removed if the option is no longer valid. i.e. if there are multiple values and some are still valid then they should remain being set and only invalid values should be removed
🐛 Bug report
Status

Needs work

Version

1.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024