mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
80113: Rename searching$ into loading$
This commit is contained in:
@@ -33,9 +33,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<ds-loading *ngIf="searching$ | async"></ds-loading>
|
<ds-loading *ngIf="loading$ | async"></ds-loading>
|
||||||
<ds-pagination
|
<ds-pagination
|
||||||
*ngIf="(pageInfoState$ | async)?.totalElements > 0 && !(searching$ | async)"
|
*ngIf="(pageInfoState$ | async)?.totalElements > 0 && !(loading$ | async)"
|
||||||
[paginationOptions]="config"
|
[paginationOptions]="config"
|
||||||
[pageInfoState]="pageInfoState$"
|
[pageInfoState]="pageInfoState$"
|
||||||
[collectionSize]="(pageInfoState$ | async)?.totalElements"
|
[collectionSize]="(pageInfoState$ | async)?.totalElements"
|
||||||
|
@@ -75,7 +75,7 @@ export class GroupsRegistryComponent implements OnInit, OnDestroy {
|
|||||||
/**
|
/**
|
||||||
* A boolean representing if a search is pending
|
* A boolean representing if a search is pending
|
||||||
*/
|
*/
|
||||||
searching$: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);
|
loading$: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);
|
||||||
|
|
||||||
// Current search in groups registry
|
// Current search in groups registry
|
||||||
currentSearchQuery: string;
|
currentSearchQuery: string;
|
||||||
@@ -118,7 +118,7 @@ export class GroupsRegistryComponent implements OnInit, OnDestroy {
|
|||||||
* @param data Contains query param
|
* @param data Contains query param
|
||||||
*/
|
*/
|
||||||
search(data: any) {
|
search(data: any) {
|
||||||
this.searching$.next(true);
|
this.loading$.next(true);
|
||||||
if (hasValue(this.searchSub)) {
|
if (hasValue(this.searchSub)) {
|
||||||
this.searchSub.unsubscribe();
|
this.searchSub.unsubscribe();
|
||||||
this.subs = this.subs.filter((sub: Subscription) => sub !== this.searchSub);
|
this.subs = this.subs.filter((sub: Subscription) => sub !== this.searchSub);
|
||||||
@@ -174,7 +174,7 @@ export class GroupsRegistryComponent implements OnInit, OnDestroy {
|
|||||||
).subscribe((value: PaginatedList<GroupDtoModel>) => {
|
).subscribe((value: PaginatedList<GroupDtoModel>) => {
|
||||||
this.groupsDto$.next(value);
|
this.groupsDto$.next(value);
|
||||||
this.pageInfoState$.next(value.pageInfo);
|
this.pageInfoState$.next(value.pageInfo);
|
||||||
this.searching$.next(false);
|
this.loading$.next(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
this.subs.push(this.searchSub);
|
this.subs.push(this.searchSub);
|
||||||
|
Reference in New Issue
Block a user