From 67e030258215cda50bb18c40aa005cbe2b8b4bb5 Mon Sep 17 00:00:00 2001
From: Mickael <mickael.varlet@xelians.fr>
Date: Tue, 18 Aug 2020 18:58:10 +0200
Subject: [PATCH] [US TRTL-268] fix switchmap without debounceTIme ?

---
 .../information-tab/information-tab.component.ts         | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/ui/ui-frontend/projects/identity/src/app/profile/profile-detail/information-tab/information-tab.component.ts b/ui/ui-frontend/projects/identity/src/app/profile/profile-detail/information-tab/information-tab.component.ts
index a2fa8f94..4bd97075 100644
--- a/ui/ui-frontend/projects/identity/src/app/profile/profile-detail/information-tab/information-tab.component.ts
+++ b/ui/ui-frontend/projects/identity/src/app/profile/profile-detail/information-tab/information-tab.component.ts
@@ -36,8 +36,8 @@
  */
 import { Component, Input, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { merge, of, Subscription } from 'rxjs';
-import { catchError, debounceTime, filter, map, switchMap } from 'rxjs/operators';
+import { of, Subscription } from 'rxjs';
+import { catchError, filter, map, switchMap } from 'rxjs/operators';
 import { extend, isEmpty } from 'underscore';
 
 import { AuthService, buildValidators, diff, Profile, Role } from 'ui-frontend-common';
@@ -45,8 +45,6 @@ import { AuthService, buildValidators, diff, Profile, Role } from 'ui-frontend-c
 import { ProfileService } from '../../profile.service';
 import { ProfileValidators } from '../../profile.validators';
 
-const DEBOUNCE_TIME = 400;
-
 @Component({
   selector: 'app-information-tab',
   templateUrl: './information-tab.component.html',
@@ -91,9 +89,8 @@ export class InformationTabComponent implements OnDestroy, OnInit, OnChanges {
     });
 
     // TODO FIXME GET CUSTOMERID FROM PROFILE
-    this.updateFormSub = merge(this.form.valueChanges, this.form.statusChanges)
+    this.updateFormSub = this.form.valueChanges
       .pipe(
-        debounceTime(DEBOUNCE_TIME),
         map(() => diff(this.form.value, this.previousValue)),
         filter((formData) => !isEmpty(formData)),
         map((formData) => this.completeRoles(formData)),
-- 
GitLab