Closed nelsonic closed 5 years ago
Trying out this basic counter example: https://dennisbeatty.com/2019/03/19/how-to-create-a-counter-with-phoenix-live-view.html On: https://github.com/dwyl/live-view-counter
Hi @RobStallion I'm attempting to in-line the status <select>
on the todos index page:
I can't get the phx-change
to fire when the <select>
is updated.
Can you help?
<select>
<%= for status <- statusliststring() do %>
<option phx-value="<%= todo.id %>_<%= status %>"
value="<%= status %>"
<%= selected(todo.status, status) %>
>
<%= human_readble_status(status) %>
</option>
<% end %>
</select>
Works!!
Read: https://elixirschool.com/blog/phoenix-live-view and https://github.com/dwyl/phoenix-live-view-counter
Todo
[x] Broadcast changes to checklist items using Phoenix Live View.
[x] Send Todo item
id
to handlehandle_event
so we know which Todo to update the status of.[x] Update Checklist Status on the index page