Open Jim56450 opened 1 year ago
I wonder if updateFromParent
from 2.8 would fix this? https://symfony.com/bundles/ux-live-component/current/index.html#each-component-re-renders-independent-of-one-another
In the code's current form, even if it's not what you want, I actually agree with how it's working right now. Once a child component is rendered, its writable props (e.g. title
in this case) become, sort of, "local data": even if the parent re-renders, the child keeps that writable data. The new updateFromParent
might allow you to override this behavior.
Hi Ryan !
Thanks for your answer and sorry for the delay.
Unfortunately, updateFromParent
doesn't fix the problem.
I prepared a reproducer here .
This reproducer discusses about 3 test cases for 2 simple parent / child components, exploring data-model
and data-live-id
arguments.
Steps :
I added my personal comments on each tab.
Thanks in advance,
Marc.
Thank you for this issue. There has not been a lot of activity here for a while. Has this been resolved?
Friendly ping? Should this still be open? I will close if I don't hear anything.
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!
Thank you for this issue. There has not been a lot of activity here for a while. Has this been resolved?
Imagine 2 components like this :
parent_component :
child_component :
child_component
title
andcontent
properties are both writable and updateFromParent LiveProps.If you change
title-editor
input value, it will update the title in the parent component (select is re-rendered), but not in the child component.