Live Component within form not updated

Updating focused input elements from the server doesn’t work by design - it is assumed that user input “takes priority” while the element is focused. See Syncing changes and optimistic UIs — Phoenix LiveView v1.2.5 for the challenges and model used.

I had to cook up a bit of an elaborate workaround a few days ago to handle checkbox clicks that toggle state server-side - I ended up using JS.focus to push the focus to a hidden input (using sr-only tailwind class) so I could update the checkbox state. I’m sure someone here can give me some better ideas!

As to the form not updating - do you mean the server representation of the form, or how it renders in the browser?