From e24bdcd9115a02079812e1a60fce9617c381aaf2 Mon Sep 17 00:00:00 2001 From: Fahri Gedik <53567152+fahrigedik@users.noreply.github.com> Date: Sun, 15 Feb 2026 13:16:57 +0300 Subject: [PATCH] Reapply default inputs on data change Import Angular's effect and add a reactive effect that reads this.data() and, if data.inputs and defaultComponentRef are present, calls setDefaultComponentInputs(). Ensures default component inputs are reapplied when the directive's input data changes. --- .../src/lib/directives/replaceable-template.directive.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/npm/ng-packs/packages/core/src/lib/directives/replaceable-template.directive.ts b/npm/ng-packs/packages/core/src/lib/directives/replaceable-template.directive.ts index 4659f5b814..f39ba1fdd3 100644 --- a/npm/ng-packs/packages/core/src/lib/directives/replaceable-template.directive.ts +++ b/npm/ng-packs/packages/core/src/lib/directives/replaceable-template.directive.ts @@ -1,5 +1,6 @@ import { Directive, + effect, Injector, OnChanges, OnInit, @@ -54,6 +55,13 @@ export class ReplaceableTemplateDirective implements OnInit, OnChanges { this.setDefaultComponentInputs(); }, }; + + effect(() => { + const data = this.data(); + if (data?.inputs && this.defaultComponentRef) { + this.setDefaultComponentInputs(); + } + }); } ngOnInit() {