mmhglobal-dynamicform 2.15.2 → 2.15.3
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.
- package/README.md +4 -0
- package/esm2020/lib/services/main.service.mjs +2 -1
- package/esm2020/lib/zgrid/zgrid.binding.directive.mjs +27 -4
- package/fesm2015/mmhglobal-dynamicform.mjs +27 -2
- package/fesm2015/mmhglobal-dynamicform.mjs.map +1 -1
- package/fesm2020/mmhglobal-dynamicform.mjs +26 -2
- package/fesm2020/mmhglobal-dynamicform.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1808,6 +1808,7 @@ class MainService {
|
|
|
1808
1808
|
this.group.signalRCallbackHandler = {};
|
|
1809
1809
|
}
|
|
1810
1810
|
this.group.signalRCallbackHandler['alertFormModified'] = this.alertFormModified.bind(this, formId);
|
|
1811
|
+
this.signalrService.unsubscribeFromEvent(`${eventName}`); // unsubscribe the event before subscribe to event again.
|
|
1811
1812
|
this.signalrService.subscribeToEvent(this.group, `${eventName}`, `group.signalRCallbackHandler.alertFormModified`);
|
|
1812
1813
|
}
|
|
1813
1814
|
else {
|
|
@@ -2841,8 +2842,31 @@ class ZGridBindingDirective extends DataBindingDirective {
|
|
|
2841
2842
|
}
|
|
2842
2843
|
});
|
|
2843
2844
|
}
|
|
2844
|
-
this.
|
|
2845
|
-
|
|
2845
|
+
if (this.field.GridFilterConfiguration?.OnChange) {
|
|
2846
|
+
console.log("GridFilterConfiguration.OnChange triggered");
|
|
2847
|
+
// Use switchMap to handle the asynchronous operation
|
|
2848
|
+
of(this.params.filterParams).pipe(switchMap((filterParams) => {
|
|
2849
|
+
let expression = this.field.GridFilterConfiguration.OnChange;
|
|
2850
|
+
expression = expression.replace('modalGroup.', 'group.');
|
|
2851
|
+
expression = expression.replace('group.', 'grp.');
|
|
2852
|
+
const func = eval('this.' + expression);
|
|
2853
|
+
const callFunc = func.bind(this.grp);
|
|
2854
|
+
return callFunc(filterParams);
|
|
2855
|
+
})).subscribe((updatedFilterParams) => {
|
|
2856
|
+
console.log(updatedFilterParams);
|
|
2857
|
+
// update filterParams
|
|
2858
|
+
if (updatedFilterParams) {
|
|
2859
|
+
this.params.filterParams = updatedFilterParams;
|
|
2860
|
+
}
|
|
2861
|
+
this.changeEvent.filterChanged = true;
|
|
2862
|
+
this.getDataBinding();
|
|
2863
|
+
});
|
|
2864
|
+
}
|
|
2865
|
+
else {
|
|
2866
|
+
// If there is no GridFilterConfiguration.OnChange
|
|
2867
|
+
this.changeEvent.filterChanged = true;
|
|
2868
|
+
this.getDataBinding();
|
|
2869
|
+
}
|
|
2846
2870
|
}
|
|
2847
2871
|
dataStateChange(state) {
|
|
2848
2872
|
this.grid.loading = true;
|