rename sortingOptionChanged$ to sortingOption$
This commit is contained in:
parent
f8c632ba2f
commit
024645651f
@ -50,7 +50,7 @@ export abstract class BaseListingComponent<T> extends AutoUnsubscribeComponent i
|
||||
}
|
||||
|
||||
private get _sortedDisplayedEntities$(): Observable<T[]> {
|
||||
return this.sortingService.sortingOptionChanged$.pipe(
|
||||
return this.sortingService.sortingOption$.pipe(
|
||||
switchMap(() => this.screenStateService.displayedEntities$.pipe(map(entities => this.sortingService.defaultSort(entities))))
|
||||
);
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<span class="all-caps-label">{{ label }}</span>
|
||||
<mat-icon *ngIf="!!rightIcon" [matTooltip]="rightIconTooltip" [svgIcon]="rightIcon" matTooltipPosition="above"></mat-icon>
|
||||
|
||||
<ng-container *ngIf="sortingService?.sortingOptionChanged$ | async as sortingOption">
|
||||
<ng-container *ngIf="sortingService?.sortingOption$ | async as sortingOption">
|
||||
<div *ngIf="withSort" [class.force-display]="sortingOption.column === column" class="sort-arrows-container">
|
||||
<mat-icon *ngIf="sortingOption.order === 'asc'" svgIcon="red:sort-asc"></mat-icon>
|
||||
<mat-icon *ngIf="sortingOption.order === 'desc'" svgIcon="red:sort-desc"></mat-icon>
|
||||
|
||||
@ -19,7 +19,7 @@ export interface SortingOption {
|
||||
})
|
||||
export class SortingService {
|
||||
private readonly _sortingOption$ = new BehaviorSubject<SortingOption>(null);
|
||||
readonly sortingOptionChanged$ = this._sortingOption$.asObservable();
|
||||
readonly sortingOption$ = this._sortingOption$.asObservable();
|
||||
|
||||
get sortingOption(): SortingOption {
|
||||
return this._sortingOption$.getValue();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user