diff --git a/web-ui/src/components/ufe-context/ufe-context.tsx b/web-ui/src/components/ufe-context/ufe-context.tsx index ad34622..d617849 100644 --- a/web-ui/src/components/ufe-context/ufe-context.tsx +++ b/web-ui/src/components/ufe-context/ufe-context.tsx @@ -17,8 +17,10 @@ export class UfeContext { // attributes will be propagated to rendered web components @Prop() attributes: { [key: string]: string} - // if set, then the "data" property will be assigned to the rendered components - @Prop() data: any; + // any data, + @Prop() data: { + [key: string]: any + }; private ufeRegistry: UfeRegistry; @@ -36,11 +38,11 @@ export class UfeContext { {contextElements.map( el => { - el.attributes = Object.assign({}, el.attributes, this.attributes); + const element = this.ufeRegistry.loadAndRenderElement(el, Object.assign({}, this.attributes, this.data)); return ( - + { element } )