Added disabled$ to page header action config
This commit is contained in:
parent
d11b54bb11
commit
1b8ce8ef1d
@ -1,6 +1,8 @@
|
||||
import { BaseHeaderConfig } from './base-config.model';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
export interface ActionConfig extends BaseHeaderConfig {
|
||||
readonly action: ($event: MouseEvent) => void;
|
||||
readonly helpModeKey?: string;
|
||||
readonly disabled$?: Observable<boolean>;
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<div class="page-header">
|
||||
<div *ngIf="pageLabel" class="breadcrumb">{{ pageLabel }}</div>
|
||||
|
||||
<div *ngIf="filters$ | async as filters" class="filters" [iqserHelpMode]="helpModeKey">
|
||||
<div *ngIf="filters$ | async as filters" [iqserHelpMode]="helpModeKey" class="filters">
|
||||
<div *ngIf="filters.length && searchPosition !== searchPositions.beforeFilters" translate="filters.filter-by"></div>
|
||||
|
||||
<ng-container *ngIf="searchPosition === searchPositions.beforeFilters" [ngTemplateOutlet]="searchBar"></ng-container>
|
||||
@ -12,7 +12,13 @@
|
||||
|
||||
<ng-container *ngIf="searchPosition === searchPositions.afterFilters" [ngTemplateOutlet]="searchBar"></ng-container>
|
||||
|
||||
<div (click)="resetFilters()" *ngIf="showResetFilters$ | async" class="reset-filters" translate="reset-filters" iqserHelpMode="reset-filters"></div>
|
||||
<div
|
||||
(click)="resetFilters()"
|
||||
*ngIf="showResetFilters$ | async"
|
||||
class="reset-filters"
|
||||
iqserHelpMode="reset-filters"
|
||||
translate="reset-filters"
|
||||
></div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="showCloseButton || actionConfigs || buttonConfigs || viewModeSelection" class="actions">
|
||||
@ -23,9 +29,9 @@
|
||||
(action)="config.action($event)"
|
||||
*ngIf="!config.hide"
|
||||
[icon]="config.icon"
|
||||
[iqserHelpMode]="config.helpModeKey"
|
||||
[label]="config.label | translate"
|
||||
[type]="config.type"
|
||||
[iqserHelpMode]="config.helpModeKey"
|
||||
></iqser-icon-button>
|
||||
</ng-container>
|
||||
|
||||
@ -34,9 +40,10 @@
|
||||
<iqser-circle-button
|
||||
(action)="config.action($event)"
|
||||
*ngIf="!config.hide"
|
||||
[disabled]="config.disabled$ && (config.disabled$ | async)"
|
||||
[icon]="config.icon"
|
||||
[tooltip]="config.label"
|
||||
[iqserHelpMode]="config.helpModeKey"
|
||||
[tooltip]="config.label"
|
||||
tooltipPosition="below"
|
||||
></iqser-circle-button>
|
||||
</ng-container>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user