phoenixframework / phoenix_live_view

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

Form field id not updating in sync with field name #3283

Closed tmjoen closed 1 month ago

tmjoen commented 1 month ago

Environment

Actual behavior

When dragging and dropping inputs_for fields in order to sort them with sort_param, the field's id is not in sync with the field's name. In our main app this might be the reason for maybe patching the wrong id when we edit the input. I tried recreating it, but couldn't unless I had the id and _persistent_id outside the dragged div (which we don't have in our app).

I was hoping that maybe this could remind you of something you've seen before? I've attached a video for demonstration purposes.

It's almost as if the ID change "lags".

https://github.com/phoenixframework/phoenix_live_view/assets/10501945/7aa790f0-a815-44f9-a45c-567d1c774784

tmjoen commented 1 month ago

I realize this bug report is horrible — I'll investigate more and reopen if I find anything :)