@wavemaker/app-ng-runtime 11.5.0-next.141091 → 11.5.0-next.141097

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1876,10 +1876,14 @@ class PartialParamHandlerDirective {
1876
1876
  }
1877
1877
  registerParams(name, value, bindExpr, type) {
1878
1878
  this.widgetRef.partialParams[name] = value;
1879
+ let viewParent = this.widgetRef.getViewParent();
1880
+ if (this.widgetRef.inj._tNode.parent === null) {
1881
+ viewParent = this.getViewParent(viewParent);
1882
+ }
1879
1883
  if (!value && bindExpr) {
1880
1884
  this.widgetRef.registerDestroyListener(
1881
1885
  //[Todo-CSP]: expr fn should be generated be default
1882
- $watch(bindExpr, this.widgetRef.getViewParent(), _.get(this.widgetRef, 'context'), nv => {
1886
+ $watch(bindExpr, viewParent, _.get(this.widgetRef, 'context'), nv => {
1883
1887
  this.widgetRef.partialParams[name] = nv;
1884
1888
  // notify the partial container of the param changes
1885
1889
  this.widgetRef.params$.next();
@@ -1889,6 +1893,13 @@ class PartialParamHandlerDirective {
1889
1893
  this.widgetRef.params$.next();
1890
1894
  }
1891
1895
  }
1896
+ getViewParent(viewParent) {
1897
+ let parent = viewParent.viewParent;
1898
+ if (parent.hasOwnProperty("isDynamicComponent") || parent.hasOwnProperty("isPageComponent")) {
1899
+ return parent;
1900
+ }
1901
+ return this.getViewParent(parent);
1902
+ }
1892
1903
  }
1893
1904
  PartialParamHandlerDirective.ɵfac = function PartialParamHandlerDirective_Factory(t) { return new (t || PartialParamHandlerDirective)(i0.ɵɵdirectiveInject(WidgetRef, 2)); };
1894
1905
  PartialParamHandlerDirective.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: PartialParamHandlerDirective, selectors: [["", "partialContainer", ""]] });