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

Select on nested form raises ArgumentError #115

Open
rgraff opened this issue Sep 4, 2024 · 5 comments
Open

Select on nested form raises ArgumentError #115

rgraff opened this issue Sep 4, 2024 · 5 comments

Comments

@rgraff
Copy link

rgraff commented Sep 4, 2024

Using select(conn, "Users", from: "Metric") will error on fields generated with <inputs_for .../>

     ** (ArgumentError) value for hidden "automation[trigger][_touched]" must be one of ["_form_type,_persistent_id,_touched,name,type"], got: "name,type"
    code: |> select(metric.name, from: "Metric")
    stacktrace:
      (phoenix_live_view 0.20.17) lib/phoenix_live_view/test/live_view_test.ex:1102: Phoenix.LiveViewTest.call/2
      (phoenix_test 0.3.1) lib/phoenix_test/live.ex:219: PhoenixTest.Live.fill_form/3

It works with <inputs_for skip_hidden={true} .../>

@rgraff rgraff changed the title Select on nested form errors Select on nested form raises ArgumentError Sep 4, 2024
@germsvel
Copy link
Owner

germsvel commented Sep 5, 2024

Thanks for opening the issue @rgraff!

Any chance you could include some code that makes this easy to reproduce?

@rgraff
Copy link
Author

rgraff commented Sep 5, 2024

Unfortunately, I can't reproduce the error in the test suite. I'm not exactly sure what happens with <.inputs_for .../> so I'm not confident my test setup is correct.

@germsvel
Copy link
Owner

germsvel commented Sep 5, 2024

@rgraff can you use reproduce the error in a sample Phoenix app that you can share with us? Would that be easier than trying to add a test in phoenix_test?

@rgraff
Copy link
Author

rgraff commented Sep 13, 2024

@germsvel yes, I will do that in the next couple weeks. Have a deadline right now and have worked-around this issue for now.

@germsvel
Copy link
Owner

have worked-around this issue for now.

Excellent! 👍 Glad to hear it's not blocking you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants