diff --git a/libs/components/package.json b/libs/components/package.json index f9aeb69..5c37183 100644 --- a/libs/components/package.json +++ b/libs/components/package.json @@ -1,6 +1,6 @@ { "name": "@shiftcode/ngx-components", - "version": "12.0.1", + "version": "12.0.2-pr59.0", "repository": "https://github.com/shiftcode/sc-ng-commons-public", "license": "MIT", "author": "shiftcode GmbH ", diff --git a/libs/components/src/lib/rx/base-rx.directive.ts b/libs/components/src/lib/rx/base-rx.directive.ts index c878f79..11796e6 100644 --- a/libs/components/src/lib/rx/base-rx.directive.ts +++ b/libs/components/src/lib/rx/base-rx.directive.ts @@ -2,7 +2,7 @@ import { DestroyRef, EmbeddedViewRef, inject, TemplateRef, Type, ViewContainerRe import { from, isObservable, ObservableInput, Subscription } from 'rxjs' import { ERROR_INPUT_NAME, RX_DEFAULT_ERROR_COMPONENT } from './internals' -export abstract class BaseRxDirective { +export abstract class BaseRxDirective { protected _input: ObservableInput | null protected _subscription: Subscription | null = null protected _dataViewRef: EmbeddedViewRef | null = null @@ -46,7 +46,10 @@ export abstract class BaseRxDirective { */ protected renderDataView(context: Ctx) { if (this._dataViewRef && this.containerRef.indexOf(this._dataViewRef) === 0) { - this._dataViewRef.context = context + const ctxKeys: Array = Object.keys(context) as any + for (const key of ctxKeys) { + this._dataViewRef.context[key] = context[key] + } } else { this.clear() this._dataViewRef = this.containerRef.createEmbeddedView(this.templateRef, context)