liveview-native / liveview-native/liveview-client-html
Simple form not valid inside of html template.
Open
@bcardarella is already working on this.
Since Nov 11, 2024.
- Dominant language
- Elixir
- Stars
- 13
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
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)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.