mmhglobal-dynamicform 2.0.0 → 2.0.1

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.
@@ -2450,8 +2450,10 @@ class MainService {
2450
2450
  const referenceId = group.parentReferenceId || "0";
2451
2451
  //const pathSegment = this.router.url.split("/");
2452
2452
  //const lastSegment = pathSegment[pathSegment.length - 1];
2453
- const paramSegment = this.getNavigationCurrentParam().split("/");
2454
- const actionSegment = group.isCloneNew ? 'new' : paramSegment[paramSegment.length - 1];
2453
+ const currentNavigationParam = this.getNavigationCurrentParam();
2454
+ const navigationSegments = currentNavigationParam ? currentNavigationParam.split('/') : null;
2455
+ const defaultAction = group.isCloneNew ? 'new' : 'edit';
2456
+ const actionSegment = group.isCloneNew ? (navigationSegments ? navigationSegments[navigationSegments.length - 1] : 'new') : defaultAction;
2455
2457
  if (group.isListForm) {
2456
2458
  this.tryUpdateGroupTrigger(false);
2457
2459
  this.setNavigationParams([referenceId, 'new']);
@@ -12220,6 +12222,10 @@ class ZudfComponent {
12220
12222
  for (const key of Object.keys(fg.controls)) {
12221
12223
  this.setContainerFieldErrorAsNull(fg, key);
12222
12224
  }
12225
+ // Check is the formgroup value again.
12226
+ if (fg.valid) {
12227
+ return true;
12228
+ }
12223
12229
  // Show the error message for the form
12224
12230
  this.componentErrorHandlerService.showFormGroupErrorMessage(this.group, fg);
12225
12231
  // Return false to indicate that the form is not valid