Browsers you attempted to reproduce this bug on (the more the merrier): Chrome (is a generated HTML issue, so the browser is not the problem here)
Does the problem persist after removing "assets/node_modules" and trying again? Yes/no: Yes.
Actual behavior
Passing an id option to .inputs_for is ignored. When inputs_for/3 was a thing, using the :id option would let us customise the id generated. Since inputs_for/3 no longer exists and inputs_for/4 generates an error when being used with LiveView, we migrated our code to use .input_for. One of our forms requires customising the ID but doing anything on the sorts of:
~H"""
<.inputs_for :let={subform} field={form[:subfield]} id="some-custom-id">
<% # Some content here %>
</.inputs_for>
"""
Environment
Actual behavior
Passing an
id
option to.inputs_for
is ignored. Wheninputs_for/3
was a thing, using the:id
option would let us customise the id generated. Sinceinputs_for/3
no longer exists andinputs_for/4
generates an error when being used with LiveView, we migrated our code to use.input_for
. One of our forms requires customising the ID but doing anything on the sorts of:Does not affect the output at all.
Moreover, this bug is demonstrated in the test suite for
.inputs_for
As seen above, thought the option
id="test"
is being given to.inputs_for
,"test"
is nowhere to be found in the output.Expected behavior
In the test above, id should look something like
test_inner_0_foo
.