phoenixframework / phoenix_live_view

Rich, real-time user experiences with server-rendered HTML
https://hex.pm/packages/phoenix_live_view
MIT License
5.99k stars 902 forks source link

Fix using named form inputs with put_submitter/2 #3300

Closed krishandley closed 3 weeks ago

krishandley commented 3 weeks ago

I created a bug in #3298 if you used put_submitter with a button outside the form.

** (FunctionClauseError) no function clause matching in Phoenix.LiveViewTest.ClientProxy.form_defaults/3

# 1
{"button", [...], [...]}...

So this fixes using put_submitter/2 with named inputs because before I included buttons in maybe_submitter/2.

I'll try and write some extra tests for error/failure cases next week. I've run out of time this weekend.

chrismccord commented 3 weeks ago

❤️❤️❤️🐥🔥