Open
Description
Imagine 2 components like this :
parent_component :
<div {{attributes}}>
<select data-model="on(change)|postId">
{% for post in this.posts %}
<option value="{{ post.id }}"
{% if post.id==postId %}
selected
{% endif %}
>{{ post.title }}</option>
{% endfor %}
</select>
<input name="title-editor" data-model="post.title" />
{{ component(child_component, {
dataModel: 'post.title:title post.content:content',
'data-live-id': 'post-edit-'~postId
}) }}
</div>
child_component :
<div {{ attributes }}>
<input data-model="debounce(500)|title"/>
<input data-model="debounce(500)|content"/>
</div>
child_component title
and content
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.