-
Notifications
You must be signed in to change notification settings - Fork 927
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
render_hook/3
fails without explicit phx-target
#3315
Comments
The documentation says:
The requirement that it must be a single element seems inconvenient, especially when my phx-hook (and therefore phx-target) is on a div containing other elements. I had a test for a sortable list |
Environment
Actual behavior
Using
render_hook(element(view, "#hook-el-id"), "event", map)
requires#hook-el-id
to have aphx-target
attribute for therender_hook/3
to work.Expected behavior
The
phx-target
attribute seems to not be required outside of tests and it would seems to hold the same value asdata-phx-component
anyways. My expectation would be thatphx-target
shouldn't be required forrender_hook/3
as well.The text was updated successfully, but these errors were encountered: