material_select not working when using in transclusion component
bmarechal opened this issue · 0 comments
Hi,
We were trying to create templated components using transclusion and asynchronous loading, and it does not work great with angular2-materialize, as shown on this plunker.
When using transclusion, all components are rendered at once, then displayed depending on the structural directives and other.
The problem is that material_select gets initialised at that moment, and does not get updated at render.
The only correct work around I find would be to implement OnChange on the component that's passed to the template component, listen to the changes and update the list (to do an ugly this.list = this.list.map(x => x)), so that it updates the materialSelectOptions properties.
Any prettier suggestion for this one ?