Pull request #5: VM/DeactivateEmptyFilters
Merge in SL/common-ui from VM/DeactivateEmptyFilters2 to master * commit 'e620d66ba9cc4aac8b9414a6968adff678246619': deactivated empty filters
This commit is contained in:
commit
f7a13a4234
@ -1,4 +1,4 @@
|
||||
<button [class.overlay]="showDot" [class.primary]="primary" mat-button>
|
||||
<button [class.overlay]="showDot" [class.primary]="primary" [disabled]="disabled" mat-button>
|
||||
<span>{{ label }}</span>
|
||||
<mat-icon class="chevron-icon" svgIcon="iqser:arrow-down"></mat-icon>
|
||||
</button>
|
||||
|
||||
@ -11,4 +11,5 @@ export class ChevronButtonComponent {
|
||||
@Input() @Required() label!: string;
|
||||
@Input() showDot = false;
|
||||
@Input() primary = false;
|
||||
@Input() disabled = false;
|
||||
}
|
||||
|
||||
@ -14,6 +14,13 @@ button {
|
||||
}
|
||||
}
|
||||
|
||||
&.mat-button-disabled {
|
||||
cursor: not-allowed;
|
||||
::ng-deep .mat-button-wrapper {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
mat-icon {
|
||||
width: 14px;
|
||||
}
|
||||
|
||||
@ -1,20 +1,39 @@
|
||||
<ng-container *ngIf="primaryFilterGroup$ | async as primaryGroup">
|
||||
<iqser-icon-button
|
||||
*ngIf="primaryGroup.icon"
|
||||
[attr.aria-expanded]="expanded$ | async"
|
||||
[icon]="primaryGroup.icon"
|
||||
[label]="primaryGroup.label || ('filter-menu.label' | translate)"
|
||||
[matMenuTriggerFor]="filterMenu"
|
||||
[showDot]="hasActiveFilters$ | async"
|
||||
></iqser-icon-button>
|
||||
<ng-container *ngIf="primaryGroup.icon" [ngSwitch]="(primaryFilters$ | async)?.length > 0">
|
||||
<iqser-icon-button
|
||||
*ngSwitchCase="false"
|
||||
[icon]="primaryGroup.icon"
|
||||
[label]="primaryGroup.label || ('filter-menu.label' | translate)"
|
||||
[disabled]="true"
|
||||
></iqser-icon-button>
|
||||
|
||||
<iqser-chevron-button
|
||||
*ngIf="!primaryGroup.icon"
|
||||
[attr.aria-expanded]="expanded$ | async"
|
||||
[label]="primaryGroup.label || ('filter-menu.label' | translate)"
|
||||
[matMenuTriggerFor]="filterMenu"
|
||||
[showDot]="hasActiveFilters$ | async"
|
||||
></iqser-chevron-button>
|
||||
<iqser-icon-button
|
||||
*ngSwitchCase="true"
|
||||
[attr.aria-expanded]="expanded$ | async"
|
||||
[icon]="primaryGroup.icon"
|
||||
[label]="primaryGroup.label || ('filter-menu.label' | translate)"
|
||||
[matMenuTriggerFor]="filterMenu"
|
||||
[showDot]="hasActiveFilters$ | async"
|
||||
></iqser-icon-button>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="!primaryGroup.icon" [ngSwitch]="(primaryFilters$ | async)?.length > 0">
|
||||
<iqser-chevron-button
|
||||
*ngSwitchCase="false"
|
||||
[attr.aria-expanded]="expanded$ | async"
|
||||
[label]="primaryGroup.label || ('filter-menu.label' | translate)"
|
||||
[showDot]="hasActiveFilters$ | async"
|
||||
[disabled]="true"
|
||||
></iqser-chevron-button>
|
||||
|
||||
<iqser-chevron-button
|
||||
*ngSwitchCase="true"
|
||||
[attr.aria-expanded]="expanded$ | async"
|
||||
[label]="primaryGroup.label || ('filter-menu.label' | translate)"
|
||||
[matMenuTriggerFor]="filterMenu"
|
||||
[showDot]="hasActiveFilters$ | async"
|
||||
></iqser-chevron-button>
|
||||
</ng-container>
|
||||
|
||||
<mat-menu
|
||||
#filterMenu="matMenu"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user