@brggroup/share-lib 0.0.52 → 0.0.53
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.
|
@@ -10,7 +10,7 @@ import { NzNotificationService } from 'ng-zorro-antd/notification';
|
|
|
10
10
|
import * as i1 from 'ng-zorro-antd/modal';
|
|
11
11
|
import { NzModalService } from 'ng-zorro-antd/modal';
|
|
12
12
|
import { jwtDecode } from 'jwt-decode';
|
|
13
|
-
import { switchMap,
|
|
13
|
+
import { switchMap, distinctUntilChanged, filter as filter$1, takeUntil } from 'rxjs/operators';
|
|
14
14
|
import * as i2$2 from '@angular/forms';
|
|
15
15
|
import { FormGroup, FormsModule, ReactiveFormsModule, Validators, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
16
16
|
import * as i1$2 from '@angular/common';
|
|
@@ -711,9 +711,7 @@ class LoadingService {
|
|
|
711
711
|
/** Trả về observable loading có delay khi bật để tránh chớp nháy */
|
|
712
712
|
get loading$() {
|
|
713
713
|
return this.loadingSubject.asObservable().pipe(switchMap((loading) => {
|
|
714
|
-
return loading
|
|
715
|
-
? of(true).pipe(delay(200)) // delay khi bật
|
|
716
|
-
: of(false); // tắt thì không delay
|
|
714
|
+
return of(loading);
|
|
717
715
|
}), distinctUntilChanged());
|
|
718
716
|
}
|
|
719
717
|
/** Nếu chỉ cần giá trị hiện tại boolean (ít dùng hơn) */
|