I've got a <select>
in a LiveComponent and I want to react to the value being changed. There's no submit button. I have this:
<form>
<select phx-change="per_page_changed" phx-target={@myself} >
<option value={3}>3</option>
<option value={5}>5</option>
</select>
</form>
When I change the value, my component's handle_event
is called, but the params are %{"_target" => ["undefined"]}
- no value from the select
. What I am I doing wrong?