I this example repository I have a very simple form in LiveView at “/” using inputs_for
:
https://github.com/preciz/my_app/blob/main/lib/my_app_web/live/parent_live.ex
MyApp.Parent
is an embedded_schema
that embeds_many
MyApp.Child
.
I would like to update these children in a form using inputs_for
.
Current behavior:
When I update the changeset
the children loses name and age values that were previously set.
My question:
How would I need to change this simple example that the children keep their attributes and only update the selected
attribute in the changeset
.