-
Notifications
You must be signed in to change notification settings - Fork 27
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
Says could not generate to HTML #17
Comments
Not without more context :) How are you adding LiveSelect to your view/component? Can you please show me your heex template? |
maybe you're trying to add the component to the root template directly? |
I am adding it not to a heex template, but inside a component, and that component will be used inside a heex template. This is the component
|
Thanks. This is probably the reason. The anonymous function in your Try using the variant without anonymous function: https://hexdocs.pm/phoenix_html/Phoenix.HTML.Form.html#inputs_for/3 |
I changed the annonymous function to this |
Okay, I think I figured it out! Thank you for pointing me in the right direction! |
Great! Glad you figured it out. |
Just to be clear, I can pass the options like this right? |
No you can't. Take look at the docs: https://hexdocs.pm/live_select/LiveSelect.html#live_select/3 <%= live_select(f, :assignee, options: Constants.asignee_list()) %> |
cannot convert component LiveSelect.Component with id "test[review][0][name_review]_assignee_component" to HTML.
A component must always be returned directly as part of a LiveView template.
Any idea?
The text was updated successfully, but these errors were encountered: