symfony / ux

Symfony UX initiative: a JavaScript ecosystem for Symfony
https://ux.symfony.com/
MIT License
853 stars 315 forks source link

[LiveComponent] Form re-render only possible with live-id on component instantiation #1400

Open davidhoelzel opened 10 months ago

davidhoelzel commented 10 months ago

The form inside a live-component is not re-rendered although formData changes.

I'm not sure if this is intended, thereforce I have created a reproducer-repo: https://github.com/davidhoelzel/ux-reproducer

ProviderComponent is providing data for the form of FormComponent. When ProviderComponent provides new data, the FormComponent is updated (due to "updateFromParent: true" on its LiveProp). But it seems that only those parts of the template are updated where the liveProp is explicitly used. The LiveProp of the FormComponent is updated as expected and all parts of the template where this prop is used are re-rendered. Also, the instantiateForm method is called again and the form gets re-recreated with the new formData. But the form is not re-rendered in the template.

What I've tried:

What is working:

carsonbot commented 3 months ago

Thank you for this issue. There has not been a lot of activity here for a while. Has this been resolved?

carsonbot commented 3 months ago

Just a quick reminder to make a comment on this. If I don't hear anything I'll close this.

carsonbot commented 3 months ago

Hey,

I didn't hear anything so I'm going to close it. Feel free to comment if this is still relevant, I can always reopen!