phoenix_live_view icon indicating copy to clipboard operation
phoenix_live_view copied to clipboard

Only forms with `id` attribute are recovered

Open achempion opened this issue 3 years ago • 0 comments

How to reproduce

$ mix phx.new myapp && cd myapp/ && mix ecto.create
$ mix phx.gen.live Accounts User users name:string
# copy routes from output to router.ex
$ mix ecto.migrate

Now,

  • remove id attribute from a form in lib/myapp_web/live/user_live/form_component.html.heex,
  • start the server,
  • visit /users/new
  • and type something into the form's field,
  • restart the server.

The form's state wouldn't recover.

achempion avatar Jul 12 '22 21:07 achempion