-
1. Re: custom tags are losing their children
mbarkley Oct 3, 2017 11:24 AM (in response to treblereel)Hi Dmitri,
When Errai creates a component it replaces the element from your template with the corresponding @DataField in your templated bean, so you are having the paper-input with the iron-input inside it replaced with a paper-input with no content. For some kinds of @DataFields (like Widgets implementing HasHtml) Errai would preserve the child elements, but we haven't yet implemented anything like this for elements.
A temporary solution is to programmatically add an iron-input as a child of your PaperInput, or to not use a @DataField and programmatically lookup your PaperInput from your template with a query selector. A better long-term solution is to open a JIRA for a feature for new API to support this. In particular, we had a feature added in Errai 4 to support configuring the merge strategy for attributes of elements in the @DataField annotation. It might make sense for @DataField to have an attribute as well to specify whether the child-content of an element should be preserved.