Open BrooklinJazz opened 3 weeks ago
I noticed the simple_form component doesn't seem to work when using the liveview-client-html library with a render component.
Here's my template:
<h1 class="text-2xl">Chat App</h1> <section class="h-[400px] overflow-y-scroll"> <%= for message <- @messages do %> <p><%= message.name %></p> <p class="mb-2"><%= message.content %></p> <% end %> </section> <.simple_form for={@form} id="form" phx-submit="send-message"> <.input field={@form[:name]} placeholder="From..." /> <.input field={@form[:content]} placeholder="Say..." /> <:actions> <.button type="submit"> Send Message </.button> </:actions> </.simple_form>
Here's my render component:
defmodule ChatWeb.ChatLive.HTML do use ChatNative, [:render_component, format: :html] end
Very weirdly it's interpreted as text. (see the image below)
@BrooklinJazz are you using ~H or ~LVN ?
~H
~LVN
For the render function, I'm using ~H
But in the example, I'm using a separate template file
I noticed the simple_form component doesn't seem to work when using the liveview-client-html library with a render component.
Here's my template:
Here's my render component:
Very weirdly it's interpreted as text. (see the image below)