I am trying to render a component with a dynamically compiled layout.
Here is an example that shows nicely what I am trying to accomplish:
Upon clicking the button, somevalue
updates to “bar”, but not the whole layout gets updated.
On the third line in the rendered output it still says “foo hello” but I expected it to change to “bar hello” as the layout should be updated to this.get('somevalue') + ' hello {{some-component somevalue=somevalue}}';
as seen in the code for the dyn-layout component.
Is it possible this behaviour was different a while ago and now changed? I thought it has maybe to do with caching or something preventing the compiled layout from being updated/overwritten. Tried to figure out more but ended up going deeper down the rabbit hole than I intended to and also realized that I was in way over my head.
What am i doing wrong here? Ultimately I’d like a component where I can pass in a string that will serve as the layout of this component. That means this string can also contain handlebars code and sub-components (like for example a tooltip component to explain certain abbreviations in the string that was originally passed).