More weirdness with mv-list on tables
Rendering on a table materializes a gratuitious rendering of the data as javascript. https://codepen.io/karger/pen/xxMzxOp?editors=1100
I think the table is mostly a red herring here, the issue is a well known old one, where there is nothing in there to tell Mavo that this is a group, so it renders it as a primitive.
But note that with the div just above, the extra content is not rendered. Only in the table. Try editing the data at the top.
But note that with the div just above, the extra content is not rendered. Only in the table. Try editing the data at the top.
Yes, because with the <div>, the list item has no children (except text nodes), and the <tr> has two of them. You'll start observing the same result if you re-create a similar structure (e.g., by wrapping expressions—[name] and [age]—into <span>s).
As Lea mentioned, adding mv-group to the list items solves the issue.
I don't understand the rule that is being followed---why does the presence of children affect what happens?
I don't understand the rule that is being followed---why does the presence of children affect what happens?
In the first case (no children), Mavo replaces the element text content (as it holds the property value). In the second case, it inserts a new text node before the children (to preserve the authored HTML).